(ttloop): make it return 1 if interrupted by a signal, which must have
been what was meant from the beginning git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6900 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -47,9 +47,11 @@ RCSID("$Id$"); | ||||
|  * data from the network, and pass it through the telnet state | ||||
|  * machine.  We also flush the pty input buffer (by dropping its data) | ||||
|  * if it becomes too full. | ||||
|  * | ||||
|  * return 0 if OK or 1 if interrupted by a signal. | ||||
|  */ | ||||
|  | ||||
| void | ||||
| int | ||||
| ttloop(void) | ||||
| { | ||||
|     void netflush(void); | ||||
| @@ -61,6 +63,8 @@ ttloop(void) | ||||
| 	netflush(); | ||||
|     ncc = read(net, netibuf, sizeof netibuf); | ||||
|     if (ncc < 0) { | ||||
| 	if (errno == EINTR) | ||||
| 	    return 1; | ||||
| 	syslog(LOG_INFO, "ttloop:  read: %m\n"); | ||||
| 	exit(1); | ||||
|     } else if (ncc == 0) { | ||||
| @@ -76,6 +80,7 @@ ttloop(void) | ||||
| 	pfrontp = pbackp = ptyobuf; | ||||
| 	telrcv(); | ||||
|     } | ||||
|     return 0; | ||||
| }  /* end of ttloop */ | ||||
|  | ||||
| /* | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Assar Westerlund
					Assar Westerlund