patchDcHub: Hub software for Direct Connect - Patches: patch #2747, some race-condition when daemonize...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #2747: some race-condition when daemonize dchub

Submitted by:  Dirk Rieger <hhgoth>
Submitted on:  Sun 07 Mar 2004 12:57:35 AM UTC  
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Sun 07 Mar 2004 01:06:21 PM UTC, comment #2: 

...sorry stupid typing error - this should be correct

      • main.c.orig Sun Mar 7 01:49:44 2004

--- main.c Sun Mar 7 01:50:43 2004
***************

      • 1307,1314 ****

/* we are ready to start the hub */
if (daemonize) {
! int child;
! switch(child = fork()) {
case -1: /* failed */
fprintf(stderr,"fork() failed\n");
exit(1);
--- 1307,1315 ----

/* we are ready to start the hub */
if (daemonize) {
! int child = fork();
! usleep(1000);
! switch(child) {
case -1: /* failed */
fprintf(stderr,"fork() failed\n");
exit(1);

Dirk Rieger <hhgoth>
Sun 07 Mar 2004 11:47:41 AM UTC, comment #1: 

...sorry stupid typing error - this should be correct

      • main.c.orig Sun Mar 7 01:49:44 2004

--- main.c Sun Mar 7 01:50:43 2004
***************

      • 1307,1314 ****

/* we are ready to start the hub */
if (daemonize) {
! int child;
! switch(child = fork()) {
case -1: /* failed */
fprintf(stderr,"fork() failed\n");
exit(1);
--- 1307,1315 ----

/* we are ready to start the hub */
if (daemonize) {
! int child = fork();
! usleep(1000);
! switch(child) {
case -1: /* failed */
fprintf(stderr,"fork() failed\n");
exit(1);

Dirk Rieger <hhgoth>
Sun 07 Mar 2004 12:57:35 AM UTC, original submission:  

hub sometimes start and sometimes breaks when trying to daemonize hub ('-z' flag at start)

this should fix this:

      • main.c.orig Sun Mar  7 01:49:44 2004

--- main.c      Sun Mar  7 01:50:43 2004
***************

      • 1307,1314 ****

        /* we are ready to start the hub */
        if (daemonize) {
!               int child;
!               switch(child = fork()) {
                    case -1: /* failed */
                                fprintf(stderr,"fork() failed\n");
                                exit(1);
--- 1307,1315 ----

        /* we are ready to start the hub */
        if (daemonize) {
!               int child = fork();
!               usleep(1000);
!               switch(child()) {
                    case -1: /* failed */
                                fprintf(stderr,"fork() failed\n");
                                exit(1);

Dirk Rieger <hhgoth>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

No changes have been made to this item

Back to the top


Powered by Savane 3.7