this repo has no description
at fixPythonPipStalling 49 lines 1.5 kB view raw
1/* 2This file is part of Darling. 3 4Copyright (C) 2017 Lubos Dolezel 5 6Darling is free software: you can redistribute it and/or modify 7it under the terms of the GNU General Public License as published by 8the Free Software Foundation, either version 3 of the License, or 9(at your option) any later version. 10 11Darling is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with Darling. If not, see <http://www.gnu.org/licenses/>. 18*/ 19 20#ifndef _SHELLSPAWN_H 21#define _SHELLSPAWN_H 22 23#ifdef TESTING 24#define SHELLSPAWN_SOCKPATH "/tmp/shellspawn.sock" 25#else 26#define SHELLSPAWN_SOCKPATH "/var/run/shellspawn.sock" 27#endif 28 29typedef unsigned short shellspawn_cmd_type_t; 30 31enum { 32 SHELLSPAWN_ADDARG = 1, // add shell argument 33 SHELLSPAWN_SETENV, // add env variable string 34 SHELLSPAWN_CHDIR, 35 SHELLSPAWN_GO, // execute the shell/executable now, must also contain file descriptors 36 SHELLSPAWN_SIGNAL, // pass a signal from client 37 SHELLSPAWN_SETUIDGID, // set virtual uid and gid 38 SHELLSPAWN_SETEXEC, // set the executable to spawn (instead of a shell). must be given before any ADDARG commands. 39}; 40 41struct __attribute__((packed)) shellspawn_cmd 42{ 43 shellspawn_cmd_type_t cmd; 44 unsigned short data_length; 45 char data[]; 46}; 47 48#endif 49