Took out system() debugging again

This commit is contained in:
Russ Magee 2018-06-08 22:55:50 -07:00
parent 3c44cdbe3b
commit 59979a4896
1 changed files with 7 additions and 6 deletions

View File

@ -19,7 +19,7 @@ package go_login
//
//
//void pututmp(struct utmpx* entry, char* name, char* host) {
// int32_t stat = system("echo ---- pre ----;who");
// //int32_t stat = system("echo ---- pre ----;who");
//
// entry->ut_type = USER_PROCESS;
// entry->ut_pid = getpid();
@ -34,7 +34,7 @@ package go_login
// setutxent();
// pututxline(entry);
//
// stat = system("echo ---- post ----;who");
// //stat = system("echo ---- post ----;who");
//}
//
//void unpututmp(struct utmpx* entry) {
@ -45,7 +45,7 @@ package go_login
// setutxent();
// pututxline(entry);
//
// int32_t stat = system("echo ---- cleanup ----;who; lastlog");
// //int32_t stat = system("echo ---- cleanup ----;who; lastlog");
//
// endutxent();
//}
@ -69,7 +69,7 @@ package go_login
// int fd = fileno(f);
// if( write(fd, &l, sizeof(l)) == sizeof(l) ) {
// retval = 1;
// int32_t stat = system("echo ---- lastlog ----; lastlog");
// //int32_t stat = system("echo ---- lastlog ----; lastlog");
// }
// }
// fclose(f);
@ -108,6 +108,7 @@ func Put_lastlog_entry(app string, usr string, host string) {
fmt.Sscanf(u.Uid, "%d", &uid)
t := time.Now().Unix()
stat := C.putlastlogentry(C.int64_t(t), C.int(uid), C.CString(app), C.CString(host))
fmt.Println("stat was:",stat)
_ = C.putlastlogentry(C.int64_t(t), C.int(uid), C.CString(app), C.CString(host))
//stat := C.putlastlogentry(C.int64_t(t), C.int(uid), C.CString(app), C.CString(host))
//fmt.Println("stat was:",stat)
}