Node webkit - Extracted files in temp folder not getting deleted on app exit

2 views
Skip to first unread message

Uma Venkitachalam

unread,
Dec 5, 2013, 5:11:10 AM12/5/13
to node-...@googlegroups.com
Hi
I am using node webkit to package app ( html, js, etc ). 
Here I have a startup.nw package which will open another node webkit using the node.js child_process.exec API. After opening the child process, the parent process (startup.nw) exits. However I see that the extracted files of startup.nw in the temp folder is not getting deleted when exit the process.
( The child process on exiting, the corresponding extracted files in temp are getting deleted )

Do you know why

Thanks in advance

Roger Wang

unread,
Dec 10, 2013, 8:40:02 PM12/10/13
to node-...@googlegroups.com
Maybe the child process is working in that directory so it cannot be removed.

Roger

Uma Venkitachalam

unread,
Dec 10, 2013, 11:49:10 PM12/10/13
to node-...@googlegroups.com


Hi Roger

Thanks for the reply. 
Yes, the child process will be continuing to run, however it does not have dependent files in the parents' package.

My startup.nw does this
1) decrypt the child.nw file & write the output into a newtmp folder
2) start the child.nw node webkit process ( it takes the child.nw file from the newtmp folder)
3) Wait for some specified time and exit ( as I am not sure how to signal back from the child to the parent, I just wait for few seconds )

Now on  the parent process exit, the newtmp folder I am deleting.
1) The child process does not have any dependencies on the files in the parent process's extracted "nw" folder in temp. Still the parent process nw folder doesnt get deleted. Is this normal ?

2) How can I know the parent's process nw folder name (in temp) if I have to manually delete it ?

Thanks in advance
Uma

Roger

unread,
Dec 11, 2013, 12:16:42 AM12/11/13
to Uma Venkitachalam, node-...@googlegroups.com
Uma Venkitachalam <uven...@gmail.com> writes:

> Hi Roger
>
> Thanks for the reply.
> Yes, the child process will be continuing to run, however it does not have
> dependent files in the parents' package.

but it could be in that directory as the "current working
directory". You can try to change the working directory in your child
process.

--
Roger

Uma Venkitachalam

unread,
Dec 11, 2013, 12:55:44 AM12/11/13
to node-...@googlegroups.com, Uma Venkitachalam
Thanks Roger

That worked..I gave some other folder in the {cwd: <folder>} option while starting the child process ( in the exec command option). Now the parent process's nw is getting removed on exit

Thanks a lot

Regards
Uma
Reply all
Reply to author
Forward
0 new messages