[seed] Add os.getpgrp
- From: Robert Carr <racarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] Add os.getpgrp
- Date: Mon, 13 Apr 2009 21:16:13 -0400 (EDT)
commit 84da10cba691bc7d628f728e0af89faf5e58d6a0
Author: Robert Carr <racarr mireia (none)>
Date: Mon Apr 13 20:59:15 2009 -0400
Add os.getpgrp
---
modules/os/os.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/modules/os/os.c b/modules/os/os.c
index b394a7e..c91fa80 100644
--- a/modules/os/os.c
+++ b/modules/os/os.c
@@ -245,6 +245,22 @@ seed_os_getpgid (SeedContext ctx,
return seed_value_from_long (ctx, (glong) getpgid(pid), exception);
}
+SeedValue
+seed_os_getpgrp (SeedContext ctx,
+ SeedObject function,
+ SeedObject this_object,
+ size_t argument_count,
+ const SeedValue arguments[],
+ SeedException * exception)
+{
+ if (argument_count != 0)
+ {
+ EXPECTED_EXCEPTION("os.getpgrp", "no arguments");
+ }
+
+ return seed_value_from_long (ctx, (glong) getpgrp(), exception);
+}
+
seed_static_function os_funcs[] = {
{"chdir", seed_os_chdir, 0},
{"fchdir", seed_os_fchdir, 0},
@@ -255,7 +271,8 @@ seed_static_function os_funcs[] = {
{"getgid", seed_os_getgid, 0},
{"getuid", seed_os_getuid, 0},
{"getlogin", seed_os_getlogin, 0},
- {"getpgid", seed_os_getpgid, 0}
+ {"getpgid", seed_os_getpgid, 0},
+ {"getpgrp", seed_os_getpgrp, 0}
};
SeedObject
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]