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

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

Discussion

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>

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

History

No changes have been made to this item

Back to the top

Powered by Savane 3.16-ed84.
Corresponding source code