Chameleon Applications

Chameleon Applications Svn Source Tree

Root/trunk/ChameleonPrefPane/Sources/ShellProcess.cpp

1/*
2 * shell_process.cpp
3 *
4 * Created by Rekursor on 1/17/2010.
5 *
6 */
7
8#include "ShellProcess.h"
9#include <string.h>
10#include <sys/stat.h>
11#include "string_util.h"
12
13//----------------------------------------------------------------
14// portable open process:
15FILE * ShellProcess::open(const char *cmd, const char *mode) {
16_fpt=::popen(cmd,mode);
17return _fpt;
18}
19
20//----------------------------------------------------------------
21int ShellProcess::close() {
22int ret = ::pclose(_fpt);
23_fpt=NULL;
24return ret;
25}
26

Archive Download this file

Revision: 341