Working on bug 184993: Writing to zombie process causes Ikarus to exit.
This commit is contained in:
		
							parent
							
								
									b00e56face
								
							
						
					
					
						commit
						264c58c4a4
					
				|  | @ -1172,7 +1172,8 @@ | |||
|        #| 18 |# "access fault" | ||||
|        #| 19 |# "file already exists" | ||||
|        #| 20 |# "invalid file name" | ||||
|        #| 21 |# "non-blocking operation would block")) | ||||
|        #| 21 |# "non-blocking operation would block" | ||||
|        #| 22 |# "broken pipe (e.g., writing to a closed process or socket)")) | ||||
| 
 | ||||
|   (define (io-error who id err) | ||||
|     (let ([err (fxnot err)]) | ||||
|  |  | |||
|  | @ -1 +1 @@ | |||
| 1358 | ||||
| 1359 | ||||
|  |  | |||
|  | @ -34,6 +34,7 @@ ikrt_io_error(){ | |||
|     case EEXIST          : return fix(-20); | ||||
|     case EINVAL          : return fix(-21); | ||||
|     case EAGAIN          : return fix(-22); /* hardcoded in ikarus.io.ss */ | ||||
|     case EPIPE           : return fix(-23); | ||||
|   } | ||||
|   return fix(-1); | ||||
| } | ||||
|  |  | |||
|  | @ -237,6 +237,18 @@ register_handlers(){ | |||
|     fprintf(stderr, "Sigaction Failed: %s\n", strerror(errno)); | ||||
|     exit(-1); | ||||
|   } | ||||
| 
 | ||||
|   /* ignore sigpipes */ | ||||
|   { | ||||
|     sigset_t set; | ||||
|     sigprocmask(0, 0, &set); /* get the set */ | ||||
|     sigaddset(&set, SIGPIPE); | ||||
|     int err = sigprocmask(SIG_SETMASK, &set, &set); | ||||
|     if(err){ | ||||
|       fprintf(stderr, "Sigprocmask Failed: %s\n", strerror(errno)); | ||||
|       exit(-1); | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Abdulaziz Ghuloum
						Abdulaziz Ghuloum