在c程序中如何启动mplayer(unter Linux)?
我想在c程序中启动mplayer(unter Linux),但是不知道使用什么函数。在正常的shell里我呼叫的命令是"mplayer /home/da/pepsi.mpg",我是想在c程序中启动它。
谢谢先 NAME
system - execute a shell command
SYNOPSIS
#include <stdlib.h>
int system(const char *command);
DESCRIPTION
system()executesacommand specified in command by calling /bin/sh -c command, and returns after the command has been completed.
During execution of the command, SIGCHLD will be blocked, and SIGINT and SIGQUIT will be ignored. 请问,在具体情况下应该在command里写什么? int ret=system("mplayer /home/da/pepsi.mpg");
自己看一下man system吧
页:
[1]