mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Increased buffer for shell commands
This commit is contained in:
parent
a738232fdb
commit
2575a37e23
@ -865,7 +865,7 @@ int my_shell(char *cmd, char *result, int size)
|
|||||||
#ifdef OS_UNIX
|
#ifdef OS_UNIX
|
||||||
pid_t child_pid;
|
pid_t child_pid;
|
||||||
int fh, status, i;
|
int fh, status, i;
|
||||||
char str[256];
|
char str[1024];
|
||||||
|
|
||||||
if ((child_pid = fork()) < 0)
|
if ((child_pid = fork()) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -877,7 +877,7 @@ int my_shell(char *cmd, char *result, int size)
|
|||||||
memset(result, 0, size);
|
memset(result, 0, size);
|
||||||
fh = open("/tmp/elog-shell", O_RDONLY);
|
fh = open("/tmp/elog-shell", O_RDONLY);
|
||||||
if (fh > 0) {
|
if (fh > 0) {
|
||||||
i = read(fh, result, size);
|
i = read(fh, result, size-1);
|
||||||
close(fh);
|
close(fh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
#define GIT_REVISION "Wed Sep 25 14:25:38 2013 +0200 - bac715d"
|
#define GIT_REVISION "Mon Jan 13 09:25:57 2014 +0100 - a738232"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user