Fresco/Prague/include/Prague/IPC Coprocess.hh,1.18,1.19 ipcbuf.hh,1.17,1.18
Tobias Hunger <[email protected]> Fri, 07 Nov 2003 23:46:38 +0000
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Prague/include/Prague/IPC
In directory purcel:/tmp/cvs-serv6616/Prague/include/Prague/IPC
Modified Files:
Coprocess.hh ipcbuf.hh
Log Message:
Throw std::runtime_error instead of using perror function in Prague.
Closes bug281.
Index: Coprocess.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Prague/include/Prague/IPC/Coprocess.hh,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- Coprocess.hh 6 Nov 2003 18:03:59 -0000 1.18
+++ Coprocess.hh 7 Nov 2003 23:46:35 -0000 1.19
@@ -28,6 +28,7 @@
#include <Prague/IPC/Agent.hh>
#include <string>
#include <vector>
+#include <stdexcept>
namespace Prague
{
@@ -70,7 +71,7 @@
virtual ipcbuf *ebuf() { return _errbuf; }
protected:
virtual bool process(int, iomask);
- void terminate();
+ void terminate() throw(std::runtime_error);
void shutdown(int);
std::string _path;
IONotifier *_ioNotifier;
@@ -85,7 +86,7 @@
Coprocess(const Coprocess &);
Coprocess &operator = (const Coprocess &);
bool terminated;
- void kill(Signal::type);
+ void kill(Signal::type) throw(std::runtime_error);
mutable Mutex _mutex;
struct
{
Index: ipcbuf.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Prague/include/Prague/IPC/ipcbuf.hh,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- ipcbuf.hh 31 Oct 2003 22:33:09 -0000 1.17
+++ ipcbuf.hh 7 Nov 2003 23:46:35 -0000 1.18
@@ -24,6 +24,7 @@
#include <ios>
#include <streambuf>
+#include <stdexcept>
namespace Prague
{
@@ -54,9 +55,11 @@
bool writeready() const;
bool exceptionpending() const;
//. try to read n bytes into buf, return the number of bytes actually read
- virtual std::streamsize sys_read(char *buf, std::streamsize n);
+ virtual std::streamsize sys_read(char *buf, std::streamsize n)
+ throw(std::runtime_error);
//. try to write n bytes from buf, return the number of bytes actually written
- virtual std::streamsize sys_write(const char *buf, std::streamsize n);
+ virtual std::streamsize sys_write(const char *buf, std::streamsize n)
+ throw(std::runtime_error);
// virtual int write (const void *, int);
// virtual int read (void *, int);
//. return the file descriptor for that buffer