FreeBSD Bugzilla – Attachment 9877 Details for
Bug 20042
"rsh -t" doesn't timeout if rcmd(3) never returns [patch included]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.01 KB, created by
Keith White
on 2000-07-19 19:40:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Keith White
Created:
2000-07-19 19:40:01 UTC
Size:
1.01 KB
patch
obsolete
>*** rsh.c.orig Thu Feb 24 16:06:19 2000 >--- rsh.c Wed Jul 19 14:27:01 2000 >*************** >*** 89,94 **** >--- 89,97 ---- > > char *copyargs __P((char **)); > void sendsig __P((int)); >+ #ifndef NOKSW >+ void connect_timeout __P((int)); >+ #endif > void talk __P((int, long, pid_t, int, int)); > void usage __P((void)); > >*************** >*** 283,290 **** >--- 286,305 ---- > &rfd2, family); > } > #else >+ #ifndef NOKSW >+ if (timeout) { >+ signal(SIGALRM, connect_timeout); >+ alarm(timeout); >+ } >+ #endif > rem = rcmd_af(&host, sp->s_port, pw->pw_name, user, args, &rfd2, > family); >+ #ifndef NOKSW >+ if (timeout) { >+ signal(SIGALRM, SIG_DFL); >+ alarm(0); >+ } >+ #endif > #endif > > if (rem < 0) >*************** >*** 445,450 **** >--- 460,474 ---- > } > } while (FD_ISSET(rfd2, &readfrom) || FD_ISSET(rem, &readfrom)); > } >+ >+ #ifndef NOKSW >+ void >+ connect_timeout(sig) >+ int sig; >+ { >+ errx(1, "timeout reached before connection completed."); >+ } >+ #endif > > void > sendsig(sig) >---cut here---
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20042
: 9877