diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-08-23 22:54:42 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-08-23 22:54:42 +0200 |
| commit | ef3e79e0bb6ba4a5e5d4dc1467281370e1d8b488 (patch) | |
| tree | 0f492cbf72e3cbc1954d6187e9d539bd0525e951 /UCoreUtils.pas | |
| parent | 182fe0717f8e7fefd1e5c1eb42968fd29e15156f (diff) | |
| download | tuxcmd-ef3e79e0bb6ba4a5e5d4dc1467281370e1d8b488.tar.xz | |
Fix some compiler warnings
Diffstat (limited to 'UCoreUtils.pas')
| -rw-r--r-- | UCoreUtils.pas | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/UCoreUtils.pas b/UCoreUtils.pas index ed697d5..8865290 100644 --- a/UCoreUtils.pas +++ b/UCoreUtils.pas @@ -1245,6 +1245,7 @@ begin if Length(Args) = 0 then Exit; for x := 0 to Length(Args) - 1 do Args[x] := RemoveQuotation(Args[x]); DebugMsg(['**** Running spawn']); + x := -1; try x := SpawnProcess(Args[0], Running, Args); except @@ -1356,10 +1357,10 @@ begin // forked PID else begin + args_list := nil; try SplitArgs(Parameters, Command); // Fill the args_list array - args_list := nil; if Length(Parameters) > 0 then begin args_list := malloc((Length(Parameters) + 1) * SizeOf(PChar)); memset(args_list, 0, (Length(Parameters) + 1) * SizeOf(PChar)); @@ -1904,7 +1905,7 @@ end; (********************************************************************************************************************************) procedure signal_proc(signal_number: integer); cdecl; -var pid, status: integer; +var {pid,} status: integer; begin // !!!!!!!!!! Warning // There should be no debug outputs in this function because it probably cause program freezes after fork @@ -1923,7 +1924,7 @@ begin SIGCHLD, SIGUSR1: begin // DebugMsg(['begin wait']); // wait(@status); - pid := waitpid(-1, @status, WNOHANG); + {pid :=} waitpid(-1, @status, WNOHANG); // DebugMsg(['**** waitpid result: pid = ', pid, ', status = ', status]); // DebugMsg(['end wait']); if signal_number = SIGUSR1 then ChildExitStatus := status; |
