email@example.com.COM (Paul Fuqua) writes:
> I've discovered that signal-process, wait, signal-process-group,
> and wait-process-group do not work the way I expect using scsh 0.5.1
> under Solaris 2.5.1. Specifically, wait will hang until the process
> exits, even with wait/poll specified, and signal-process will hang
> uninterruptibly forever.
I stumbled across the same problem a few days ago, but did not yet have the
time to post it as it seemed noone else used this. A quick solution: Use 65
instead of wait/poll, e.g.
(wait p 65)
I don't know whether 64 or 65 would be right, 65 works for me.
The "correct" solution is to change the constants in the file
The file currently contains:
> ;;; These definitions are for NeXTSTEP.
> (define wait/poll 1) ; Don't hang if nothing to wait for.
> (define wait/stopped-children 2) ; Report on suspended subprocs, too.
Whereas /usr/include/sys/wait.h says (Note the numbers are octal):
> #define WUNTRACED 0004 /* wait for processes stopped by signals */
> #define WNOHANG 0100 /* non blocking form of wait */
> #if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
> #define WEXITED 0001 /* wait for processes that have exited */
> #define WTRAPPED 0002 /* wait for processes stopped while tracing */
> #define WSTOPPED WUNTRACED /* backwards compatibility */
> #define WCONTINUED 0010 /* wait for processes continued */
> #define WNOWAIT 0200 /* non destructive form of wait */
Which constants have to be or'ed together to get the intended behaviour?
wait/poll = WNOHANG or wait/poll = WNOHANG logior WEXITED?
I don't know.
Lavielle EDV Systemberatung GmbH & Co. Tel.: ++49 40 / 658088
Lotharstrasse 2b, D-22041 Hamburg Fax.: ++49 40 / 65808-202
http://www.lavielle.de/ Email: firstname.lastname@example.org