diff options
author | Richard Ipsum <richardipsum@fastmail.co.uk> | 2018-06-22 21:36:18 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2018-06-26 16:55:46 +0100 |
commit | 8ce58c3259361e904033f88d83e958765181d8a3 (patch) | |
tree | d1cc3fc1c9c87d9b72b01eb53fe11c40e92b09d6 | |
parent | 69987d9d4b1035f17de806aa848ef1af3c6c1a75 (diff) | |
download | luxio-8ce58c3259361e904033f88d83e958765181d8a3.tar.gz |
Bind getpgrp(2)
-rw-r--r-- | luxio.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -731,7 +731,18 @@ luxio_getlogin(lua_State *L) /* 4.2.4 */ @section procgroup */ -/* TODO: getpgrp() 4.3.1 */ +static int +luxio_getpgrp(lua_State *L) +{ + pid_t pgid; + + pgid = getpgrp(); + + lua_pushinteger(L, pgid); + + return 1; +} + /* TODO: setsid() 4.3.2 */ /* TODO: setpgid() 4.3.3 */ @@ -4454,6 +4465,8 @@ luxio_functions[] = { { "getpid", luxio_getpid }, { "getppid", luxio_getppid }, + { "getpgrp", luxio_getpgrp }, + { "getuid", luxio_getuid }, { "geteuid", luxio_geteuid }, { "getgid", luxio_getgid }, |