Re: How do you use 'cdrw' within an application?

From: Joerg Schilling (js_at_cs.tu-berlin.de)
Date: 12/02/03

  • Next message: ROBG: "Want to buy Servers"
    Date: 2 Dec 2003 10:09:29 GMT
    
    

    In article <DnQyb.69828$Ek.60053@twister.austin.rr.com>,
    Logan Shaw <lshaw-usenet@austin.rr.com> wrote:
    >M Sudderth wrote:
    >
    >> I'm using a Plextor PX-W1210TSE CD-RW drive on a Solaris 8 system.
    >>
    >> I'm writing an application in C++ and need to be able to burn
    >> files/image to a CD from within the application.
    >>
    >> 'cdrw' may be able to be used, but it's a command-line command. I may
    >> be able to use the "system" operation:
    >> i.e.
    >> system("mkisofs -r <directory> 2>/tmp/cdrw_log | cdrw -i -p 4");
    >>
    >> But errors can not be returned to the calling application. This will
    >> only
    >> work in the "happy day" scenario.
    >
    >The proper thing to do would be to create a pipe using pipe().
    >Then, for mkisofs, do a fork() and connect the child process's
    >input to /dev/null and stdout to the input end of the pipe
    >(and close the output end of the pipe in that process). Then
    ....

    >From listening to some problems with cdrw in the past, it seems that
    "cdrw" does not necessarily print an error message when something
    did go wrong. I am not sure if the exit code will be != 0 in such
    a case....

    cdrecord will always print a readable error message and exit != 0
    if there was an error. Installing a recent cdrtools package (current
    is 2.01a19) grants you also that you use a recent and best bug free
    version of mkisofs. Note that even the next version of Solaris 9
    will include only mkisofs-1.14 which is now more than 2 years old.

    Be sure that you use the mkisofs that comes with the cdrtools package
    and not /usr/bin/mkisofs

    P.S. meet me at SunNetwork in Berlin

    -- 
    EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
          js@cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
          schilling@fokus.fraunhofer.de	(work) chars I am J"org Schilling
    URL:  http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
    

  • Next message: ROBG: "Want to buy Servers"

    Relevant Pages

    • Re: How do you use cdrw within an application?
      ... >The proper thing to do would be to create a pipe using pipe. ... >Then, for mkisofs, do a forkand connect the child process's ... Be sure that you use the mkisofs that comes with the cdrtools package ... P.S. meet me at SunNetwork in Berlin ...
      (comp.sys.sun.admin)
    • Re: How do you use cdrw within an application?
      ... >The proper thing to do would be to create a pipe using pipe. ... >Then, for mkisofs, do a forkand connect the child process's ... Be sure that you use the mkisofs that comes with the cdrtools package ... P.S. meet me at SunNetwork in Berlin ...
      (comp.sys.sun.hardware)
    • Re: How do you use cdrw within an application?
      ... >The proper thing to do would be to create a pipe using pipe. ... >Then, for mkisofs, do a forkand connect the child process's ... Be sure that you use the mkisofs that comes with the cdrtools package ... P.S. meet me at SunNetwork in Berlin ...
      (comp.unix.solaris)
    • Re: Linux 2.6.17-rc2
      ... the current 16 entries of the pipe ... DVD burning probably isn't a good splice fit, ... Ideally, on mkisofs side, we'd be able to: ...
      (Linux-Kernel)
    • Re: New German Pipe Carver
      ... Germany and teaching at a University. ... I am a pipe smoker. ... Somehow, one German pipe carver, Nils Thomsen has been overlooked on ... Nils Thomsen's store is very well known in Berlin. ...
      (alt.smokers.pipes)