Anonymous | Login | Signup for a new account | 11-10-2008 11:21 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0001576 | [BusyBox] Other | minor | always | 11-06-07 05:30 | 02-13-08 07:50 | |||||||
Reporter | jensnachtigall | View Status | public | |||||||||
Assigned To | BusyBox | |||||||||||
Priority | normal | Resolution | open | |||||||||
Status | feedback | Product Version | svn | |||||||||
Summary | 0001576: ash -c causes two processes (compatibility issue) | |||||||||||
Description |
background: =========== I use a software that starts plugins via the -c flag of the shell, and then to unload/stop the plugin again, it sends SIGTERM or SIGKILL to the plugin's pid. See the code snippet: void Plugin::start() { [...] pid = fork(); [...] execl("/bin/sh", "/bin/sh", "-c", (cmdline + " " + name).c_str(), NULL); } This works fine with bash, where a command like "bash -c "sleep 10"" results in just one process, namely just in the "sleep 10" process. However, with ash a command like "ash -c "sleep 10"" results in 2 processes, namely first "ash -c sleep 10" and then "sleep 10". For the above software this means that pid = fork() is the pid of "ash -c <plugin-command>" and not of "<plugin-command>, so the signals go to the "ash -c <plugin-command>" and not to "plugin-command" as it was with bash. Would be nice if ash behaved in the same way as bash (and probably other shells) by just starting the command after the "-c" option (that is, one command). |
|||||||||||
Additional Information | ||||||||||||
Attached Files | ||||||||||||
|
Copyright © 2000 - 2006 Mantis Group |