Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 262169 Details for
Bug 354531
sys-apps/kbd - `openvt -w' always returns error
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Fixes various issues with option -w
kbd_openvt_wait_fix.patch (text/plain), 1.10 KB, created by
Robert White
on 2011-02-11 21:08:45 UTC
(
hide
)
Description:
Fixes various issues with option -w
Filename:
MIME Type:
Creator:
Robert White
Created:
2011-02-11 21:08:45 UTC
Size:
1.10 KB
patch
obsolete
>diff -ru kbd-1.15_orig/src/openvt.c kbd-1.15/src/openvt.c >--- kbd-1.15_orig/src/openvt.c 2008-10-23 12:03:59.000000000 -0700 >+++ kbd-1.15/src/openvt.c 2011-02-11 12:50:24.582000148 -0800 >@@ -39,7 +39,8 @@ > main(int argc, char *argv[]) > { > >- int opt, pid, i; >+ int opt, i; >+ pid_t pid; > struct vt_stat vtstat; > int vtno = -1; > int fd0 = -1; >@@ -296,13 +297,17 @@ > _exit(127); /* exec failed */ > } > >+ /* we need to clean up our file descriptors if we want dallocation to work later */ >+ close(fd0); >+ > if ( pid < 0 ) { > perror("openvt: fork() error"); > return(6); > } > > if ( do_wait ) { >- wait(NULL); >+ int retval = 0; /* actual value returned form process */ >+ waitpid(pid,&retval,0); > if (show) { /* Switch back... */ > if (ioctl(consfd, VT_ACTIVATE, vtstat.v_active)) { > perror("VT_ACTIVATE"); >@@ -319,6 +324,9 @@ > return(8); > } > } >+ /* if all our stuff went right, we want to return the exit code of the command we ran */ >+ /* super vital for scripting loops etc */ >+ return(retval); > } > > return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 354531
: 262169