|
Lines 683-690
Link Here
|
| 683 |
(void) err(1, "cannot open device file `%s'", APM_NORM_DEVICEFILE); |
683 |
(void) err(1, "cannot open device file `%s'", APM_NORM_DEVICEFILE); |
| 684 |
} |
684 |
} |
| 685 |
|
685 |
|
|
|
686 |
if (fcntl(apmnorm_fd, F_SETFD, 1) == -1) { |
| 687 |
(void) err(1, "cannot set close-on-exec flag for device file '%s'", APM_NORM_DEVICEFILE); |
| 688 |
} |
| 689 |
|
| 686 |
if ((apmctl_fd = open(APM_CTL_DEVICEFILE, O_RDWR)) == -1) { |
690 |
if ((apmctl_fd = open(APM_CTL_DEVICEFILE, O_RDWR)) == -1) { |
| 687 |
(void) err(1, "cannot open device file `%s'", APM_CTL_DEVICEFILE); |
691 |
(void) err(1, "cannot open device file `%s'", APM_CTL_DEVICEFILE); |
|
|
692 |
} |
| 693 |
|
| 694 |
if (fcntl(apmctl_fd, F_SETFD, 1) == -1) { |
| 695 |
(void) err(1, "cannot set close-on-exec flag for device file '%s'", APM_CTL_DEVICEFILE); |
| 688 |
} |
696 |
} |
| 689 |
|
697 |
|
| 690 |
restart(); |
698 |
restart(); |