[BusyBox] busybox-0.60.1 pidof return exit code

Max Headroom maxheadroom2323 at yahoo.com
Thu May 16 13:20:05 UTC 2002


We found that code currently in pidof.c aloways
returns 0( EXT_SUCCESS ) to the calling process.
This makes in impossible to use pidof in
scripts that require an exit status 
to determine if pidof suceeded.
We suggest that the following lines in
pidof.c at about line number 77 be changed
from:
    printf("\n");
    return EXIT_SUCCESS;
to:
    printf("\n");
    if (fail) return EXIT_FAILURE;
    return EXIT_SUCCESS;

We were wondering if there is a reason why the
current version of pidof behaves this way.
It does not appear to be POSIX compliant.

I am attaching a patch file.

Thanks



__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox_pidof.diff
Type: application/x-unknown
Size: 87 bytes
Desc: busybox_pidof.diff
Url : http://lists.busybox.net/pipermail/busybox/attachments/20020516/e238e740/attachment.bin 


More information about the busybox mailing list