Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!texbell!attctc!larryd1 From: larryd1@attctc.Dallas.TX.US (Larry Clark) Newsgroups: comp.unix.ultrix Subject: Ultrix 3.1 and SIGSEGV Message-ID: <9202@attctc.Dallas.TX.US> Date: 1 Sep 89 09:13:55 GMT Organization: The Unix(R) Connection, Dallas, Texas Lines: 47 We recently up graded our 8810 to ultrix 3.1 from ultrix 3.0 (rev 64) and several of our applications ceased working. The applications either involved popen() or system() and signal(SIGSEGV, SIG_IGN). The following code hangs forever with the signal(SIGSEGV, SIG_IGN) compiled in it. Maybe this will save someone some time looking for the reason an application ceased to work. I've called DEC and will file an SPR. Larry Clark #include #include main() { FILE *fp; char command[128]; int i; #ifdef IN signal(SIGSEGV, SIG_IGN); #endif sprintf(command, "sh -c lp -d lp0"); fp = popen(command, "w"); if (fp == NULL) { printf("It's null\n"); exit(-1); } for (i = 0; i < 56; i++) { sprintf(command, "line %03d\n", i); fprintf(fp, "%s", command); fflush(fp); } pclose(fp); }