-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
KSH hang in |spawnvex(3ast)| #34
Comments
The need for such |
BTW, the intended use case for While it is more efficient than See https://bugzilla.redhat.com/show_bug.cgi?id=1295563 for another example of how There was a long discussion about using |
@DavidMorano This issue was more of a candidate for wiki, but thanks for reporting it. @krader1961 @DavidMorano Since we have removed support for |
YES - close. As long as VFORK is gone, I am happy. This can certainly be closed now. |
Closing as I've removed all mentions and uses of vfork from the code. |
Ksh was trying to use the 'pw' variable as a valid pointer even when it was NULL. This is fixed by doing the error check for 'pw' before doing anything else in 'job_kill'. This bugfix is from Red Hat: https://git.centos.org/rpms/ksh/blob/44e0a643a93492b1f6beebbf6ffcfd453d9ab8f2/f/SOURCES/ksh-20130214-fixkill.patch Fixes att#34
Just a reminder that if you see a hang from KSH (or another AST program) while it is in the "spawnvex(3ast)| subroutine it is most likely caused by LIBAST getting compiled with the use of
|vfork(2)|. When using VFORK, a program should pretty much just |exec(2)| after |vfork(2)|'ing.
This is just safe UNIX practice. But |spawnvex(3ast)| plays with the program signal mast (or some
such) after it has |vfork(2)|'ed but before it |exec(2)|'s. This can occasionally caused a hang on
some UNIX systems. The fix is to undefine some defines as follows in the |spawnvex(3ast)|
subroutine somewhere after the headers are included, with something like:
#undef _lib_vfork
#undef _real_vfork
Enjoy.
The text was updated successfully, but these errors were encountered: