Implementation of the system() library function