Atom Fail Execute External Process gksudo


I got error on calling child_process.exec() with

gksudo -u root dd if=/home/user/a.txt of=/home/user/b.txt

where b.txt is owned by root.
I got Command Failed error. It doesn’t seems to occur when I create js file and execute it directly with node.

With more details on stackoverflow.
Thank you.