Wednesday, 4 September 2013

Open a file for edit with $EDITOR variable from a C program

Open a file for edit with $EDITOR variable from a C program

I'm writing a c program and I want to open a file with the $EDITOR
variable to make changes to it.
Assuming that i already made the check if the $EDITOR is not set and that
the part missing is to open the file for edit, is execve() the best option
or should I use a different function?
I'm working under Arch linux.

No comments:

Post a Comment