I running my program in lua and the winexe function is launched by lua, the problem is the winexe will start correctly but does not exit. I had used file:flush(),file:close() and os.exit(), they all not working.Blow is my code:
local command = "/root/logoff_script";
local file = io.popen(command,'r');
file:write("\n");
file:flush();
local output = file:read('*all');
file:close();
Can you help me? Thanks