Moved set/get tty process group code to tty.scm.

This commit is contained in:
shivers 1995-10-26 13:36:46 +00:00
parent ef473e636e
commit 80adbe0761
2 changed files with 0 additions and 53 deletions

View File

@ -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;
}

View File

@ -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))