vtgl

terminal emulator implemented in OpenGL
git clone anongit@rnpnr.xyz:vtgl.git
Log | Files | Refs | Feed | LICENSE

os_unix.c (382B)


      1 /* See LICENSE for copyright details */
      2 #include <sys/select.h>
      3 #include <unistd.h>
      4 
      5 __attribute__((noreturn))
      6 static void
      7 execsh(s8 cmd, c8 **envp)
      8 {
      9 	ASSERT(cmd.data[cmd.len] == 0);
     10 
     11 	u8 *argv[] = {cmd.data, 0};
     12 	/* TODO: don't pretend to be xterm ? */
     13 	setenv("TERM", "xterm", 1);
     14 
     15 	execvp((c8 *)cmd.data, (c8 **)argv);
     16 
     17 	syscall1(SYS_exit_group, 1);
     18 	__builtin_unreachable();
     19 }