summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authordamien <damien>2000-04-19 21:42:21 +0000
committerdamien <damien>2000-04-19 21:42:21 +0000
commite374ae660a924e7a123dd889b1c2ed2d9fe045e2 (patch)
tree063bb5bc5077f934e692b79482bcaf8d7af98d5e /serverloop.c
parent3f406e0fb85a730b00ff5bf9e0b93423792c26f6 (diff)
downloadopenssh-e374ae660a924e7a123dd889b1c2ed2d9fe045e2.tar.gz
- Sync with OpenBSD CVS:
[clientloop.c login.c serverloop.c ssh-agent.c ssh.h sshconnect.c sshd.c] - pid_t [session.c] - remove bogus chan_read_failed. this could cause data corruption (missing data) at end of a SSH2 session.
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/serverloop.c b/serverloop.c
index a7abbe40..1a76b8da 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -52,7 +52,7 @@ static int max_fd; /* Max file descriptor number for select(). */
* that the child's output gets a chance to drain before it is yanked.
*/
-static int child_pid; /* Pid of the child. */
+static pid_t child_pid; /* Pid of the child. */
static volatile int child_terminated; /* The child has terminated. */
static volatile int child_has_selected; /* Child has had chance to drain. */
static volatile int child_wait_status; /* Status from wait(). */
@@ -63,7 +63,8 @@ void
sigchld_handler(int sig)
{
int save_errno = errno;
- int wait_pid;
+ pid_t wait_pid;
+
debug("Received SIGCHLD.");
wait_pid = wait((int *) &child_wait_status);
if (wait_pid != -1) {
@@ -373,9 +374,10 @@ process_buffered_input_packets()
* child program).
*/
void
-server_loop(int pid, int fdin_arg, int fdout_arg, int fderr_arg)
+server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
{
- int wait_status, wait_pid; /* Status and pid returned by wait(). */
+ int wait_status; /* Status returned by wait(). */
+ pid_t wait_pid; /* pid returned by wait(). */
int waiting_termination = 0; /* Have displayed waiting close message. */
unsigned int max_time_milliseconds;
unsigned int previous_stdout_buffer_bytes;