1 |
slords |
1.1 |
--- LPRng-3.8.4/src/common/checkpc.c.nonblock Mon Jan 21 11:34:52 2002 |
2 |
|
|
+++ LPRng-3.8.4/src/common/checkpc.c Mon Jan 21 11:34:53 2002 |
3 |
|
|
@@ -1096,7 +1096,7 @@ |
4 |
|
|
FPRINTF( STDERR, "Daughter re-opening line '%s'\n", serial_line ); |
5 |
|
|
if( Set_timeout() ){ |
6 |
|
|
Set_timeout_alarm( 1 ); |
7 |
|
|
- fd = Checkwrite( serial_line, &statb, O_RDWR, 0, 0 ); |
8 |
|
|
+ fd = Checkwrite( serial_line, &statb, O_RDWR, 0, 1 ); |
9 |
|
|
if( fd >= 0 ) i = LockDevice( fd, 1 ); |
10 |
|
|
} |
11 |
|
|
Clear_timeout(); |
12 |
|
|
@@ -1259,7 +1259,7 @@ |
13 |
|
|
*/ |
14 |
|
|
SNPRINTF( line, sizeof(line)) "/tmp/XX%dXX", getpid() ); |
15 |
|
|
FPRINTF( STDERR, "Checking Lockf '%s'\n", line ); |
16 |
|
|
- if( (fd = Checkwrite(line, &statb, O_RDWR, 1, 0 )) < 0) { |
17 |
|
|
+ if( (fd = Checkwrite(line, &statb, O_RDWR, 1, 1 )) < 0) { |
18 |
|
|
err = errno; |
19 |
|
|
FPRINTF( STDERR, |
20 |
|
|
"open '%s' failed: wrong result - '%s'\n", |
21 |
|
|
@@ -1278,7 +1278,7 @@ |
22 |
|
|
} else if ( pid == 0 ){ |
23 |
|
|
FPRINTF( STDERR, "Daughter re-opening and locking '%s'\n", line ); |
24 |
|
|
close( fd ); |
25 |
|
|
- if( (fd = Checkwrite(line, &statb, O_RDWR, 1, 0 )) < 0) { |
26 |
|
|
+ if( (fd = Checkwrite(line, &statb, O_RDWR, 1, 1 )) < 0) { |
27 |
|
|
err = errno; |
28 |
|
|
FPRINTF( STDERR, |
29 |
|
|
"Daughter re-open '%s' failed: wrong result - '%s'\n", |
30 |
|
|
@@ -1320,7 +1320,7 @@ |
31 |
|
|
int lock = 0; |
32 |
|
|
FPRINTF( STDERR, "Daughter re-opening '%s'\n", line ); |
33 |
|
|
close( fd ); |
34 |
|
|
- if( (fd = Checkwrite(line, &statb, O_RDWR, 1, 0 )) < 0) { |
35 |
|
|
+ if( (fd = Checkwrite(line, &statb, O_RDWR, 1, 1 )) < 0) { |
36 |
|
|
err = errno; |
37 |
|
|
FPRINTF( STDERR, |
38 |
|
|
"Daughter re-open '%s' failed: wrong result - '%s'\n", |