~ubuntu-branches/ubuntu/precise/fte/precise

« back to all changes in this revision

Viewing changes to src/e_unix.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Neil Williams
  • Date: 2011-08-14 10:28:46 UTC
  • mfrom: (1.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110814102846-kate2jfkduwpnika
Tags: 0.50.2b6-1
* QA upload.
* Synchronise with current upstream sources.
  (Closes: #195945)
* Include NMUs by Nobuhiro Iwamatsu and Hideki Yamane,
  thanks to both.
* Move to 3.0 quilt

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    snprintf(command, sizeof(command)-1, "%s %s %s >'%s' 2>&1", HelpCommand, options, word, file);
49
49
 
50
50
    /// !!! why is this needed ???
51
 
#define SYSCALL(call) while(((call) == -1) && (errno == EINTR))
 
51
#define SYSCALL(call) while (((call) == -1) && (errno == EINTR))
52
52
    pid_t pid;
53
53
    int err, status;
54
54
 
62
62
            //dup(1); // ignore error output
63
63
            close(0);
64
64
            assert(open("/dev/null", O_RDONLY) == 0);
65
 
            execlp("man", "man",
 
65
            setenv("MAN_KEEP_FORMATTING", "1", 0);
 
66
            execlp("man", "man", "-7",
66
67
#ifndef AIX // current AIX's don't like the -a.
67
68
                   "-a",
68
69
#endif
71
72
            perror("Can't exec command");
72
73
        } else
73
74
            perror("Can't open file");
74
 
        exit(-1);
 
75
        exit(1);
75
76
    } else if (pid < 0) {
76
77
        perror("Can't fork");
77
78
        return 0;