diff --git a/scsh/jcontrol2.c b/scsh/jcontrol2.c index 65b4999..6196b52 100644 --- a/scsh/jcontrol2.c +++ b/scsh/jcontrol2.c @@ -74,28 +74,3 @@ scheme_value df_get_int_handler(long nargs, scheme_value *args) return ret1; } -scheme_value df_tcsetpgrp(long nargs, scheme_value *args) -{ - extern int tcsetpgrp(int , pid_t ); - scheme_value ret1; - int r1; - - cig_check_nargs(2, nargs, "tcsetpgrp"); - r1 = tcsetpgrp(EXTRACT_FIXNUM(args[1]), EXTRACT_FIXNUM(args[0])); - ret1 = errno_or_false(r1); - return ret1; - } - -scheme_value df_tcgetpgrp(long nargs, scheme_value *args) -{ - extern pid_t tcgetpgrp(int ); - scheme_value ret1; - pid_t r1; - - cig_check_nargs(2, nargs, "tcgetpgrp"); - r1 = tcgetpgrp(EXTRACT_FIXNUM(args[1])); - ret1 = errno_or_false(r1); - VECTOR_REF(*args,0) = ENTER_FIXNUM(r1); - return ret1; - } - diff --git a/scsh/jcontrol2.scm b/scsh/jcontrol2.scm index 0e77723..1caaf98 100644 --- a/scsh/jcontrol2.scm +++ b/scsh/jcontrol2.scm @@ -165,31 +165,3 @@ (error "We don't do Scheme handlers yet.") handler) flags)) - - -;;; Set/Get tty process group -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define (set-tty-process-group port/fd proc-group) - (call/fdes port/fd - (lambda (fd) - (%set-tty-process-group fd (if (integer? proc-group) - proc-group - (proc:pid proc-group)))))) - -(define-simple-errno-syscall (%set-tty-process-group fdes pid) - %set-tty-process-group/errno) - -(define-foreign %set-tty-process-group/errno (tcsetpgrp (fixnum fdes) - (pid_t pid)) - (to-scheme integer errno_or_false)) - -(define (tty-process-group port/fd) - (call/fdes port/fd %tty-process-group)) - -(define-errno-syscall (%tty-process-group fd) %tty-process-group/errno - pid) - -(define-foreign %tty-process-group/errno (tcgetpgrp (fixnum fdes)) - (multi-rep (to-scheme pid_t errno_or_false) - pid_t))