Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1905
b: refs/heads/master
c: 1f96ddb
h: refs/heads/master
i:
  1903: 1830a35
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Jun 8, 2005
1 parent c23b78d commit 775f468
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 501cb02b431fb88c7f157c46c8b54de59d1dd463
refs/heads/master: 1f96ddb4fb40961a8ebebf7a00bbfaad55aacbd2
24 changes: 16 additions & 8 deletions trunk/arch/um/drivers/chan_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,22 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
{
struct winch_data data;
unsigned long stack;
int fds[2], pid, n, err;
int fds[2], n, err;
char c;

err = os_pipe(fds, 1, 1);
if(err < 0){
printk("winch_tramp : os_pipe failed, err = %d\n", -err);
return(err);
goto out;
}

data = ((struct winch_data) { .pty_fd = fd,
.pipe_fd = fds[1],
.close_me = fds[0] } );
pid = run_helper_thread(winch_thread, &data, 0, &stack, 0);
if(pid < 0){
err = run_helper_thread(winch_thread, &data, 0, &stack, 0);
if(err < 0){
printk("fork of winch_thread failed - errno = %d\n", errno);
return(pid);
goto out_close;
}

os_close_file(fds[1]);
Expand All @@ -168,14 +168,22 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
printk("winch_tramp : failed to read synchronization byte\n");
printk("read failed, err = %d\n", -n);
printk("fd %d will not support SIGWINCH\n", fd);
pid = -1;
err = -EINVAL;
goto out_close1;
}
return(pid);
return err ;

out_close:
os_close_file(fds[1]);
out_close1:
os_close_file(fds[0]);
out:
return err;
}

void register_winch(int fd, struct tty_struct *tty)
{
int pid, thread, thread_fd;
int pid, thread, thread_fd = -1;
int count;
char c = 1;

Expand Down

0 comments on commit 775f468

Please sign in to comment.