The Samba-Bugzilla – Attachment 1611 Details for
Bug 3315
smbfs: smbmount hangs (fork / signal deadlock)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch for #3315 (untested by bug submitter)
smbmount.patch (text/plain), 1.14 KB, created by
Christian Perrier (dead mail address)
on 2005-12-12 00:24:25 UTC
(
hide
)
Description:
Proposed patch for #3315 (untested by bug submitter)
Filename:
MIME Type:
Creator:
Christian Perrier (dead mail address)
Created:
2005-12-12 00:24:25 UTC
Size:
1.14 KB
patch
obsolete
>--- smbmount.c.orig 2005-12-07 17:56:01.418146155 +0100 >+++ smbmount.c 2005-12-11 12:19:10.414024672 +0100 >@@ -61,6 +61,11 @@ > exit(0); > } > >+static void parent_is_ready(int sig) >+{ >+ /* just continue to execute - parent is ready to die :)) */ >+} >+ > static void daemonize(void) > { > int j, status; >@@ -74,6 +79,13 @@ > > if (child_pid > 0) { > while( 1 ) { >+ /* >+ * Funny, isn't it? ;)) >+ * But children is pause()ing for this signal >+ * to go and do preporly thing with parent. >+ */ >+ kill(child_pid, SIGTERM); >+ > j = waitpid( child_pid, &status, 0 ); > if( j < 0 ) { > if( EINTR == errno ) { >@@ -91,6 +103,14 @@ > exit(WEXITSTATUS(status)); > } > >+ /* >+ * Sometimes parent stay in sys_fork() during children already kill()ing him! >+ * Deadlock in parent's code as result :( >+ * Wait for parent's SIGTERM to indicate it's readyness after sys_fork()ing. >+ */ >+ signal( SIGTERM, parent_is_ready ); >+ pause(); >+ > signal( SIGTERM, SIG_DFL ); > chdir("/"); > }
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 3315
: 1611