git://git.jankratochvil.net
/
gnokii.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2b49c94
)
Implemented renicing (-20) in gnokiid mode
uc_works1
author
short
<>
Sat, 16 Mar 2002 21:00:05 +0000
(21:00 +0000)
committer
short
<>
Sat, 16 Mar 2002 21:00:05 +0000
(21:00 +0000)
gnokii/gnokii.c
patch
|
blob
|
history
include/uccompat.h
patch
|
blob
|
history
diff --git
a/gnokii/gnokii.c
b/gnokii/gnokii.c
index
e6692ab
..
1cbe8fe
100644
(file)
--- a/
gnokii/gnokii.c
+++ b/
gnokii/gnokii.c
@@
-4119,6
+4119,8
@@
int monitormode(int argc, char *argv[])
#ifdef UCLINUX
#ifdef UCLINUX
+#define NICE_LEVEL (-20)
+
static void gnokiid_SIGCHLD(int signo)
{
fprintf (stderr, _("Child process exited, aborting...\n"));
static void gnokiid_SIGCHLD(int signo)
{
fprintf (stderr, _("Child process exited, aborting...\n"));
@@
-4180,6
+4182,8
@@
static int gnokiid(int argc, char *argv[])
#ifdef DEBUG
fprintf (stderr, _("Entering gnokiid virtual modem main loop...\n"));
#endif
#ifdef DEBUG
fprintf (stderr, _("Entering gnokiid virtual modem main loop...\n"));
#endif
+ if (nice(NICE_LEVEL))
+ fprintf (stderr, _("WARNING: nice level change failed (by %d)\n"),NICE_LEVEL);
VM_ThreadLoop();
VM_ThreadLoop();
diff --git
a/include/uccompat.h
b/include/uccompat.h
index
fa3a2b7
..
f3676c9
100644
(file)
--- a/
include/uccompat.h
+++ b/
include/uccompat.h
@@
-35,6
+35,7
@@
extern char * strrchr __P ((const char *, int));
extern pid_t getpid(void);
extern int execv(const char *path, char *const argv[]);
extern pid_t getpid(void);
extern int execv(const char *path, char *const argv[]);
+extern int nice(int inc);
#endif /* UCCOMPAT */
#endif /* UCCOMPAT */