1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
===================================================================
RCS file: /cvs/xklavier/libxklavier/libxklavier/xklavier_config_xkb.c,v
rcsdiff: /cvs/xklavier/libxklavier/libxklavier/xklavier_config_xkb.c,v: warning: Unknown phrases like `commitid ...;' are present.
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- libxklavier/xklavier_config_xkb.c 2005/09/12 17:54:44 1.29
+++ libxklavier/xklavier_config_xkb.c 2005/12/03 13:31:58 1.30
@@ -225,7 +225,7 @@
exit( 1 );
default:
/* parent */
- pid = wait( &status );
+ pid = waitpid( cpid, &status, 0 );
XklDebug( 150, "Return status of %d (well, started %d): %d\n", pid, cpid, status );
memset( (char *)&result, 0, sizeof(result) );
result.xkb = XkbAllocKeyboard();
@@ -261,9 +261,13 @@
}
fclose( tmpxkm );
XklDebug( 160, "Unlinking the temporary xkm file %s\n", xkmFN );
- if ( remove( xkmFN ) == -1 )
- XklDebug( 0, "Could not unlink the temporary xkm file %s: %d\n",
- xkmFN, errno );
+ if ( _xklDebugLevel < 500 ) /* don't remove on high debug levels! */
+ {
+ if ( remove( xkmFN ) == -1 )
+ XklDebug( 0, "Could not unlink the temporary xkm file %s: %d\n",
+ xkmFN, errno );
+ } else
+ XklDebug( 500, "Well, not really - the debug level is too high: %d\n", _xklDebugLevel );
} else /* could not open the file */
{
XklDebug( 0, "Could not open the temporary xkm file %s\n", xkmFN );
@@ -277,9 +281,13 @@
break;
}
XklDebug( 160, "Unlinking the temporary xkb file %s\n", xkbFN );
- if ( remove( xkbFN ) == -1 )
- XklDebug( 0, "Could not unlink the temporary xkb file %s: %d\n",
- xkbFN, errno );
+ if ( _xklDebugLevel < 500 ) /* don't remove on high debug levels! */
+ {
+ if ( remove( xkbFN ) == -1 )
+ XklDebug( 0, "Could not unlink the temporary xkb file %s: %d\n",
+ xkbFN, errno );
+ } else
+ XklDebug( 500, "Well, not really - the debug level is too high: %d\n", _xklDebugLevel );
} else /* could not open input tmp file */
{
XklDebug( 0, "Could not open tmp XKB file [%s]: %d\n", xkbFN, errno );
|