-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd78a72
commit b13fca7
Showing
9 changed files
with
230 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,49 @@ | ||
// Copyright (c) 2019-present Cloud <cloud@txthinking.com> | ||
// | ||
// This program is free software; you can redistribute it and/or | ||
// modify it under the terms of version 3 of the GNU General Public | ||
// License as published by the Free Software Foundation. | ||
// | ||
// This program is distributed in the hope that it will be useful, but | ||
// WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
#ifndef __JOKER_H | ||
#define __JOKER_H | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include <unistd.h> | ||
#include <sys/types.h> | ||
#include <sys/prctl.h> | ||
#include <signal.h> | ||
#include "sds/sds.h" | ||
#include "vec/src/vec.h" | ||
#include "joker.h" | ||
|
||
void help(); | ||
|
||
struct Cmd { | ||
sds command; | ||
sds path; | ||
sds name; | ||
pid_t pid; | ||
int argc; | ||
vec_str_t argv; | ||
}; | ||
|
||
void run(struct Cmd *r, sds *e); | ||
void make_cmd(struct Cmd *r, int argc, char *argv[]); | ||
void free_cmd(struct Cmd *r); | ||
void list_add(struct Cmd *r, sds *e); | ||
void list_del(struct Cmd *r, sds *e); | ||
void list_stop(struct Cmd *r, sds *e); | ||
void list(sds *e); | ||
void log(int pid, sds *e); | ||
void list_all(sds *e); | ||
void log_cmd(int pid, sds *e); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.