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

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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code