Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 155542 Details for
Bug 241356
allowed vsftp session hangs when tcp wrappers spawn is used
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
a testcase for the new signal behvaiour
test.c (text/x-csrc), 1.40 KB, created by
Tomas Janousek
on 2007-05-28 13:55:03 UTC
(
hide
)
Description:
a testcase for the new signal behvaiour
Filename:
MIME Type:
Creator:
Tomas Janousek
Created:
2007-05-28 13:55:03 UTC
Size:
1.40 KB
patch
obsolete
>/* > * Compile: > * cc -Wall -o test test.c -lwrap > * > * > * Usage: > * echo "test2 : ALL : spawn /bin/sleep 5 : ALLOW" >>/etc/hosts.allow > * ./test > * > * > * Correct output: > * > * [tjanouse@tjanouse tmp]$ ./test > * Child 13204 started. > * Checking wrap: > * Child 13204 terminated. > * waitpid: No child processes > * OK. > * > * rhbz#112975: It MUST not write "Child %i terminated." for the libwrap > * spawn. > * rhbz#156373: It MUST write "Child %i terminated." for its own process (its > * pid is printed on start." > * Also, the delay between "Checking wrap:" and "OK." MUST be 5 seconds. > */ > >#include <stdio.h> >#include <signal.h> >#include <sys/types.h> >#include <sys/wait.h> >#include <unistd.h> >#include <errno.h> >#include <tcpd.h> > >void sigchld_handler (int signum) >{ > int pid, status, serrno; > serrno = errno; > while (1) > { > pid = waitpid (WAIT_ANY, &status, WNOHANG); > if (pid < 0) > { > perror ("waitpid"); > break; > } > if (pid == 0) > break; > printf("Child %i terminated.\n", pid); > //notice_termination (pid, status); > } > errno = serrno; >} > >int main(int argc, char *argv[]) >{ > signal(SIGCHLD, sigchld_handler); > > pid_t pid = fork(); > if (pid == 0) { > sleep(3); > _exit(0); > } > printf("Child %i started.\n", pid); > > printf("Checking wrap:\n"); > hosts_ctl("test2", STRING_UNKNOWN, "1.2.3.4", STRING_UNKNOWN); > printf("OK.\n"); > > sleep(40); > > 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 241356
: 155542