pike.git / lib / modules / Search.pmod / Filter.pmod / Base.pike

version» Context lines:

pike.git/lib/modules/Search.pmod/Filter.pmod/Base.pike:1:   // This file is part of Roxen Search   // Copyright © 2001 Roxen IS. All rights reserved.   // - // $Id: Base.pike,v 1.13 2001/08/09 14:09:25 noring Exp $ + // $Id: Base.pike,v 1.14 2003/01/20 17:39:14 jonasw Exp $      //! The MIME content types this class can filter.   constant contenttypes = ({ });      constant tmp_filename = Search.TmpFile.tmp_filename;      //!   class Output   {    // Wide strings here
pike.git/lib/modules/Search.pmod/Filter.pmod/Base.pike:37:    if(links[i]->fragment)    links[i]->fragment=0;    }    }   }      //!   Output filter(Standards.URI uri, string|Stdio.File data,    string content_type, mixed ... more);    - string my_popen(array(string) args) + string my_popen(array(string) args, string|void cwd)    // A smarter version of Process.popen: No need to quote arguments.   {    Stdio.File pipe0 = Stdio.File();    Stdio.File pipe1 = pipe0->pipe(Stdio.PROP_IPC);    if(!pipe1)    if(!pipe1) error("my_popen failed (couldn't create pipe).\n"); -  Process.create_process(args, ([ "env":getenv(), "stdout":pipe1 ])); +  mapping setup = ([ "env":getenv(), "stdout":pipe1 ]); +  if (cwd) +  setup["cwd"] = cwd; +  Process.create_process(args, setup);    pipe1->close();    string result = pipe0->read();    if(!result)    error("my_popen failed with error "+pipe0->errno()+".\n");    pipe0->close();    return result;   }