tb %PID builtin command
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
#include "runtime.h"
|
||||
#include "macros.h"
|
||||
|
||||
extern uint64_t PID;
|
||||
extern PID_t PID;
|
||||
|
||||
static InterpResult RES;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#define LINEBUF_MAX 1024
|
||||
|
||||
uint64_t PID;
|
||||
PID_t PID;
|
||||
|
||||
struct {
|
||||
char *modestr;
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "runtime.h"
|
||||
#include "interp.h"
|
||||
|
||||
extern PID_t PID;
|
||||
|
||||
RtCmd *RTCMDS = NULL;
|
||||
RtAlias *RTALIASES = NULL;
|
||||
|
||||
@ -45,7 +47,13 @@ bool rt_mkalias(Token *tks) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool rt_PID(Token *tks) {
|
||||
uprintf("%lu\n", PID);
|
||||
return true;
|
||||
}
|
||||
|
||||
void rt_init(void) {
|
||||
RTCMD("%print", &rt_print);
|
||||
RTCMD("%mkalias", &rt_mkalias);
|
||||
RTCMD("%PID", &rt_PID);
|
||||
}
|
||||
|
Reference in New Issue
Block a user