Hi, (and sorry for the delay)
On Sat, Jan 23, 2016 at 11:31:00PM +0100, Karel Gardas wrote:
> > Well, it's of course more elegant, but it would also mean that
> > everytime a new pledge promise will be introduced or an existing
> > one removed, this type has to be changed. I don't know how stable
Hello,
I've thought it would be nice if Haskell type checker would work into
our strength. Attached patch defines algebraic data type Promise and
use this for calling pledge sys call. The patch also provides two
version of Promise to string conversion function. One is explicit and
another is
Hi Kili,
On Sat, Jan 23, 2016 at 10:54 PM, Matthias Kilian
wrote:
> Well, it's of course more elegant, but it would also mean that
> everytime a new pledge promise will be introduced or an existing
> one removed, this type has to be changed. I don't know how stable
> the
Hi Karel,
On Sat, Jan 23, 2016 at 02:31:52PM +0100, Karel Gardas wrote:
> I've thought it would be nice if Haskell type checker would work into
> our strength. Attached patch defines algebraic data type Promise and
> use this for calling pledge sys call. The patch also provides two
> version of
On Tue, Jan 19, 2016 at 09:09:49AM +0100, Matthias Kilian wrote:
> Add a binding to pledge(2) to package 'unix'.
Just a question, as I am unsure by just reading the code.
> Index: files/Process.hsc
> ===
> RCS file:
On Tue, Jan 19, 2016 at 09:29:58AM +0100, Sebastien Marie wrote:
>
> char *empty = {NULL};
> pledge("stdio rpath", empty);
>
should be better with an array of char *, sorry.
char *empty[] = { NULL };
pledge("stdio rpath", empty);
--
Sebastien Marie
Add a binding to pledge(2) to package 'unix'.
To use it:
- run ghc with -package unix
- import System.OpenBSD.Process ( pledge )
- call the pledge function as needed. It returns an IO () computation,
which will throw an exception in case of an error.
Notes:
- I'll also merge the -main and
On Tue, Jan 19, 2016 at 08:22:54PM +0100, Matthias Kilian wrote:
> Below is a hopefully correct and more complete diff. Again without
> bump because I'll also merge -main and -doc.
Famous last words. I missed the plist changes. Will send a new diff
later (at the moment i'm rebuilding ghc).
Ciao,
Hi,
On Tue, Jan 19, 2016 at 09:29:58AM +0100, Sebastien Marie wrote:
> Just a question, as I am unsure by just reading the code.
[...]
> > +pledge :: String -> [FilePath] -> IO ()
>
> Shouldn't be:
>
> pledge :: String -> Maybe [FilePath] -> IO ()
>
> in order to differenciate passing not
On Tue, Jan 19, 2016 at 08:43:17PM +0100, Matthias Kilian wrote:
> > Below is a hopefully correct and more complete diff. Again without
> > bump because I'll also merge -main and -doc.
>
> Famous last words. I missed the plist changes. Will send a new diff
> later (at the moment i'm rebuilding
Matthias Kilian writes:
> Add a binding to pledge(2) to package 'unix'.
>
> To use it:
>
> - run ghc with -package unix
>
> - import System.OpenBSD.Process ( pledge )
>
> - call the pledge function as needed. It returns an IO () computation,
> which will throw an exception in case of an error.
11 matches
Mail list logo