mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-05 04:06:24 -05:00
Allow arguments to be passed to applications
This commit is contained in:
parent
fda8e22d13
commit
d819eedc62
1 changed files with 2 additions and 3 deletions
5
cage.c
5
cage.c
|
|
@ -613,8 +613,7 @@ sig_handler(int signal)
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
// TODO: add support for arguments to APPLICATION.
|
||||
if (argc != 2) {
|
||||
if (argc < 2) {
|
||||
printf("Usage: %s APPLICATION\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -706,7 +705,7 @@ main(int argc, char *argv[])
|
|||
setenv("WAYLAND_DISPLAY", socket, true);
|
||||
|
||||
if (fork() == 0) {
|
||||
execl("/bin/sh", "/bin/sh", "-c", argv[1], (void *)NULL);
|
||||
execvp(argv[1], (char * const *) argv + 1);
|
||||
}
|
||||
|
||||
wl_display_run(server.wl_display);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue