Package: pari
Version: dd75740be
Severity: normal
Hi Karim and Bill, and happy new year,
on exit(), my libc version lseek()s the files which are open. This
wreaks havoc when ploth is used in a file which is read() by gp.
A simple solution, which according to me should not produce
any problem, is to use _exit(0) instead of exit(0) in pari_daemon().
(Patch below but it's faster to add the underscore by hand).
Thank you!
Loïc
PS: a severity "PITA" should be provided
diff --git a/src/language/init.c b/src/language/init.c
index 152453130..f5206c18f 100644
--- a/src/language/init.c
+++ b/src/language/init.c
@@ -342,7 +342,7 @@ pari_daemon(void)
case -1: return 1; /* father, fork failed */
case 0:
(void)setsid(); /* son becomes process group leader */
- if (fork()) exit(0); /* now son exits, also when fork fails */
+ if (fork()) _exit(0); /* now son exits, also when fork fails */
break; /* grandson: its father is the son, which exited,
* hence father becomes 'init', that'll take care of it */
default: /* father, fork succeeded */