hi i hope im posting in the right place here
im helping on writing a program with linux and lua @ the mine we have got this in the program
Code:
--// Store PID
if _OS == "Linux" then
local rfilename = "/proc/self/stat"
local rfile, err = io.open(rfilename, "r")
if rfile then
local msg = rfile:read("*a")
rfile:close()
local wfile, err = io.open (_CONFIGDIR.."pidfile", "w")
if wfile then
wfile:write(msg)
wfile:close()
end
end
end
and it outputs
Code:
6143 (lua) R 1 6143 6143 0 -1 4202560 828 0 16 0 1 0 0 0 20 0 1 0 205111863 6316032 862 18446744073709551615 134512640 134629472 4292373680 4292363708 4151641136 0 0 4096 17578 0 0 0 17 0 0 0 9 0 0
is their anyway i can just get it to save the PID and nothing else
thanks in advance for your help