|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
problem with 'yes' on cpanel killacct script
has anyone come across the following problem before?
when i try to terminate an account using whm it uses the killacct script, which runs the following and seems to fall on an infinite look somehow - system("yes | /usr/bin/mysqladmin drop $db 2>/dev/null"); the $db variable is taken from a for loop. it does what its suppose to do without any problems. only it doesnt die out in the end and i have to kill it manually, so terminating a user becomes more then just a click. i also tried running the yes piped command manually and that works just fine. if anyone could point me on the right direction on this it would be much appreciated. thanks nayeem www.bigsiteofhosting.com |
|
#2
|
|||
|
|||
|
maybe it keeps the stdin/stdout descriptors open.
try this: system("yes | /usr/bin/mysqladmin drop $db </dev/null >/dev/null 2>/dev/null"); what does this "yes" program do? just output "yes"? then you better use: system("/bin/sh -c 'echo yes|/usr/bin......'"); for ease of use you can put the command into a script file. start it as: system("/usr/bin/mysqldroptable.sh </dev/null 2>&1 >/dev/null") (you better do this, i am not sure about the behaviour if you supply a input pipe AND input redirection; and: maybe you have to switch "2>&1 >/dev/null" against ">/dev/null 2>&1", the order does matter)
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > problem with 'yes' on cpanel killacct script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|