GRASS GIS 8 Programmer's Manual
8.5.0dev(2025)-565e82de51
Main Page
Related Pages
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
x
y
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
r
s
t
u
v
w
y
Enumerations
a
c
d
e
h
i
j
l
m
n
o
p
r
s
t
v
y
Enumerator
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
run.c
Go to the documentation of this file.
1
/****************************************************************
2
this program runs its arguments as a command. it essentially
3
does what the sh would do to look for the command. if / occurs in
4
the command it runs it as is, otherwise it search the PATH
5
variable. care is taken to preserve the PATH variable that is
6
passed (as part of the environment) to the command being invoked.
7
8
the signals SIGINT and SIGQUIT are set to the default action
9
before running the command.
10
11
This program is needed because the GIS shell must ignore
12
interrupts when it runs the user's shell. There is no way to tell
13
the user's shell to re-activate interrupts in shell-ese.
14
****************************************************************/
15
16
#include <
stdio.h
>
17
#include <
stdlib.h
>
18
#include <signal.h>
19
#include <
unistd.h
>
20
#include "local_proto.h"
21
22
int
main
(
int
argc,
char
*argv[])
23
{
24
signal(SIGINT, SIG_DFL);
25
#ifndef _WIN32
26
signal(SIGQUIT, SIG_DFL);
27
#endif
28
29
argc--;
30
argv++;
31
if
(argc <= 0)
32
exit(1);
33
34
execvp(argv[0], argv);
35
fprintf(stderr,
"%s: Command not found\n"
, argv[0]);
36
exit(127);
37
38
exit(0);
39
}
main
int main(int argc, char *argv[])
Definition:
run.c:22
stdio.h
stdlib.h
unistd.h
lib
init
run.c
Generated on Thu Mar 20 2025 07:33:29 for GRASS GIS 8 Programmer's Manual by
1.9.1