summaryrefslogtreecommitdiff
path: root/Src/Modules/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules/system.c')
-rw-r--r--Src/Modules/system.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Src/Modules/system.c b/Src/Modules/system.c
index 1ab1fb17e..afaec262a 100644
--- a/Src/Modules/system.c
+++ b/Src/Modules/system.c
@@ -439,7 +439,7 @@ bin_sysseek(char *nam, char **args, Options ops, UNUSED(int func))
/**/
static mnumber
-math_systell(UNUSED(char *name), int argc, mnumber *argv, UNUSED(int id))
+math_systell(UNUSED(char *name), UNUSED(int argc), mnumber *argv, UNUSED(int id))
{
int fd = (argv->type == MN_INTEGER) ? argv->u.l : (int)argv->u.d;
mnumber ret;
@@ -521,7 +521,7 @@ static int
bin_zsystem_flock(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
{
int cloexec = 1, unlock = 0, readlock = 0;
- time_t timeout = 0;
+ zlong timeout = -1;
char *fdvar = NULL;
#ifdef HAVE_FCNTL_H
struct flock lck;
@@ -573,7 +573,7 @@ bin_zsystem_flock(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
} else {
optarg = *args++;
}
- timeout = (time_t)mathevali(optarg);
+ timeout = mathevali(optarg);
break;
case 'u':
@@ -650,7 +650,7 @@ bin_zsystem_flock(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
sleep(1);
}
} else {
- while (fcntl(flock_fd, F_SETLKW, &lck) < 0) {
+ while (fcntl(flock_fd, timeout == 0 ? F_SETLK : F_SETLKW, &lck) < 0) {
if (errflag)
return 1;
if (errno == EINTR)
@@ -834,7 +834,7 @@ enables_(Module m, int **enables)
/**/
int
-boot_(Module m)
+boot_(UNUSED(Module m))
{
return 0;
}