~ubuntu-branches/ubuntu/quantal/texmacs/quantal

« back to all changes in this revision

Viewing changes to src/System/Link/pipe_link.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA, Kamaraju Kusumanchi, kohda
  • Date: 2009-04-26 19:35:14 UTC
  • mfrom: (1.1.10 upstream) (4.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090426193514-9yo3oggdslgdls4b
Tags: 1:1.0.7.2-1
[Kamaraju Kusumanchi <kamaraju@gmail.com>]
* New upstream release
* texmacs crashes if /usr/share/texmacs/TeXmacs/misc/pixmaps/unknown.ps
  is not present. Do not remove it. (Closes: #484073, #497021)
* update patches 03_mupad.dpatch, 04_axiom.dpatch, 11-desktop-file.dpatch
* fix the mime problem in gnome. Thanks to Andrea Gamba for the fix.
[kohda]
* Refined a fix for the mime problem in gnome a bit.
* Try to fix /bin/sh problem (debian/fixsh) but it is not complete fix yet.
* Try to fix hard coded settings for ipa fonts(patches/09_ipa.dpatch), 
  especially for Debian where no ipa fonts exist yet.
* Fixed obsolete Build-Depends: changed libltdl3-dev to 
  libltdl-dev | libltdl7-dev (the latter for Ubuntu?)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
* DESCRIPTION: TeXmacs links by pipes
5
5
* COPYRIGHT  : (C) 2000  Joris van der Hoeven
6
6
*******************************************************************************
7
 
* This software falls under the GNU general public license and comes WITHOUT
8
 
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
9
 
* If you don't have this file, write to the Free Software Foundation, Inc.,
10
 
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
7
* This software falls under the GNU general public license version 3 or later.
 
8
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
 
9
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
11
10
******************************************************************************/
12
11
 
13
12
#include "pipe_link.hpp"
57
56
 
58
57
tm_link
59
58
make_pipe_link (string cmd) {
60
 
  return new pipe_link_rep (cmd);
 
59
  return tm_new<pipe_link_rep> (cmd);
61
60
}
62
61
 
63
62
/******************************************************************************
75
74
  argv[2] = _s;
76
75
  argv[3] = NULL;
77
76
  execve ("/bin/sh", argv, environ);
78
 
  delete[] _s;
 
77
  tm_delete_array (_s);
79
78
}
80
79
#endif
81
80
#endif
91
90
  bool success;
92
91
  cmdString = as_charp(cmd);
93
92
  success = PIPE_Create(cmdString, &conn);
94
 
  delete [] cmdString;
 
93
  tm_delete_array (cmdString);
95
94
  if (!success) return "Error: Could not create pipe";
96
95
  else {
97
96
#else
98
 
  pipe (pp_in );
99
 
  pipe (pp_out);
100
 
  pipe (pp_err);
 
97
  int e1= pipe (pp_in ); (void) e1;
 
98
  int e2= pipe (pp_out); (void) e2;
 
99
  int e3= pipe (pp_err); (void) e3;
101
100
  pid= fork ();
102
101
  if (pid==0) { // the child
103
102
    setsid();
181
180
#ifdef OS_WIN32
182
181
  PIPE_WriteStdin(&conn, _s, N(s));
183
182
#else
184
 
  ::write (in, _s, N(s));
 
183
  int err= ::write (in, _s, N(s));
 
184
  (void) err;
185
185
#endif
186
 
  delete[] _s;
 
186
  tm_delete_array (_s);
187
187
#endif
188
188
}
189
189