The Samba-Bugzilla – Attachment 746 Details for
Bug 1976
smbwrapper fork bug
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test case for bug in smbw_fork()
opentest.c (text/plain), 997 bytes, created by
James R Grinter (mail bounces back)
on 2004-10-27 09:17:16 UTC
(
hide
)
Description:
test case for bug in smbw_fork()
Filename:
MIME Type:
Creator:
James R Grinter (mail bounces back)
Created:
2004-10-27 09:17:16 UTC
Size:
997 bytes
patch
obsolete
>/* > * test case to demonstrate bug in smbw_fork() behaviour > * > * compile: > * cc $(getconf LFS_CFLAGS) -o opentest opentest.c > * > * run: > * $ smbsh -U 'user%password' -d 4 > * $ ./opentest > */ > >#include <sys/types.h> >#include <sys/stat.h> >#include <fcntl.h> >#include <stdio.h> >#include <errno.h> >#include <string.h> >#include <stdlib.h> >#include <unistd.h> > >#define FILE "/smb/WORKGROUP/192.168.44.11/directory/nonexistentfile" > >int main ( int argc, char *argv[] ) { > > int ret; > struct stat statbuf; > char *file; > > if ( argc == 1 ) { > file = FILE; > } > else { > file = argv[1]; > } > > ret = stat( file, &statbuf ); > if ( ret < 0 ) { > fprintf( stderr, "stat failed - errno = %d (%s)\n", errno, strerror(errno) ); > } > > if (fork() != 0) { > /* parent process -- will discover that child has terminated sessions */ > ret = lstat( file, &statbuf ); > if ( ret < 0 ) { > fprintf( stderr, "lstat failed - errno = %d (%s)\n", errno, strerror(errno) ); > } > } > > exit (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 1976
: 746 |
747