En/na Micha Nelissen ha escrit:
Luca Olivetti wrote:
synchronize and critical sections, c library with callbacks to pascal,
etc.) is working flawlessly in the foreground, but it segfaults if I try
to background it (or try to use fpFork), and this is a problem since I
want to write a daemon (i can use screen though if that isn't possible).

Backgrounding is not the same as forking.

I (vaguely) understand the difference, but I think (probably mistakenly) that the problems are related.

Backgrounding is using the
shell's job control (and sends some signal(s) to the process), forking
is what the program does itself. Can you list an example that crashes
with fpfork, and give an strace with it ?

the example daemon.pp, for example, crashes right away, strace doesn't seem very useful to me:

[EMAIL PROTECTED]:~/fork$ strace -f ./daemon
execve("./daemon", ["./daemon"], [/* 22 vars */]) = 0
syscall: unknown syscall trap 0x00008000


A simple program that just repeatedly sleeps after the fork, dies as soon as it receives any signal (e.h HUP, USR1).

Bye
--
Luca
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to