Mailing List Archive

SOLVED: failed to create ldlinux.sys
I have been having problems with syslinux not working on one system. The
error message was "failed to create ldlinux.sys". I checked and mcopy
was installed. But upon further investigation I finally found the
problem. I were starting syslinux for python (2.4) and in the python
code I made it ignore SIGNCHLD. It turns out that this signal state was
inherited by syslinux and it made waitpid() in syslinux.c fail which
caused the error message. That is syslinux thought mcopy had failed when
it had not.

The solution is to reset the SIGNCHLD handler to the default behavior
when starting syslinux. This patch does that:

--- unix/syslinux.c.orig 2007-12-13 10:41:18.000000000 +0100
+++ unix/syslinux.c 2007-12-13 10:40:52.000000000 +0100
@@ -45,6 +45,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/mount.h>
+#include <signal.h>

#include <sys/ioctl.h>
#include <linux/fs.h> /* FIGETBSZ, FIBMAP */
@@ -372,6 +373,11 @@
usage();

/*
+ * Fix sigchld handling
+ */
+ signal(SIGCHLD, SIG_DFL);
+
+ /*
* First make sure we can open the device at all, and that we have
* read/write permission.
*/

/MaF
--
Martin Forssen <maf@appgate.com> Development Manager
Phone: +46 31 7744361 AppGate Network Security AB

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: SOLVED: failed to create ldlinux.sys [ In reply to ]
maf@appgate.com wrote:
> I have been having problems with syslinux not working on one system. The
> error message was "failed to create ldlinux.sys". I checked and mcopy
> was installed. But upon further investigation I finally found the
> problem. I were starting syslinux for python (2.4) and in the python
> code I made it ignore SIGNCHLD. It turns out that this signal state was
> inherited by syslinux and it made waitpid() in syslinux.c fail which
> caused the error message. That is syslinux thought mcopy had failed when
> it had not.
>
> The solution is to reset the SIGNCHLD handler to the default behavior
> when starting syslinux. This patch does that:

If you invoke random programs (like syslinux) with SIGCHLD set to
SIG_IGN, you will have failures all over the place. I suspect the right
thing for you is to fix your Python code.

-hpa

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: SOLVED: failed to create ldlinux.sys [ In reply to ]
On 13 dec, H. Peter Anvin wrote:
> If you invoke random programs (like syslinux) with SIGCHLD set to
> SIG_IGN, you will have failures all over the place. I suspect the right
> thing for you is to fix your Python code.

It has already been fixed in python 2.5 but IMHO it would be nice if
syslinux was immune to this error.

/MaF
--
Martin Forssen <maf@appgate.com> Development Manager
Phone: +46 31 7744361 AppGate Network Security AB

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.