Re: Should System.exit be controlled by a Scope Local?

2022-03-15 Thread Andrew Haley
On 3/1/22 18:17, Sean Mullan wrote: Can you explain in a little more detail as to what the compatibility issues are with preventing threads in thread pools from calling System.exit? It is possible, I suppose, that some rather odd programmer is using a task in a thread pool to exit their

Re: Should System.exit be controlled by a Scope Local?

2022-03-02 Thread Maurizio Cimadamore
On 01/03/2022 18:17, Sean Mullan wrote: On 3/1/22 8:01 AM, Andrew Haley wrote: On 3/1/22 11:45, Andrew Haley wrote: Sure, you wouldn't be able to use the default thread pool, but that's no big deal, I would have thought. I'm sorry, I'll say that again. :-) I meant to say "you

Re: Should System.exit be controlled by a Scope Local?

2022-03-01 Thread Sean Mullan
On 3/1/22 8:01 AM, Andrew Haley wrote: On 3/1/22 11:45, Andrew Haley wrote: Sure, you wouldn't be able to use the default thread pool, but that's no big deal, I would have thought. I'm sorry, I'll say that again. :-) I meant to say "you wouldn't be able to use the default thread pool if

Re: Should System.exit be controlled by a Scope Local?

2022-03-01 Thread Andrew Haley
On 3/1/22 11:45, Andrew Haley wrote: Sure, you wouldn't be able to use the default thread pool, but that's no big deal, I would have thought. I'm sorry, I'll say that again. :-) I meant to say "you wouldn't be able to use the default thread pool if you wanted to use threads with some

Re: Should System.exit be controlled by a Scope Local?

2022-03-01 Thread Andrew Haley
On 2/28/22 15:32, Andrew Haley wrote: I think all we'd need is a set of capabilities bound to a scope local at thread startup, and I guess it'd default to "all capabilities". Trusted code could then override any of those capabilities. We'd have to make sure that capabilities were inherited by

Re: Should System.exit be controlled by a Scope Local?

2022-02-28 Thread Bernd Eckenfels
Von: core-libs-dev im Auftrag von Kasper Nielsen Gesendet: Monday, February 28, 2022 9:23:11 PM An: Ethan McCue Cc: core-libs-dev Betreff: Re: Should System.exit be controlled by a Scope Local? Is there really a need to make this so complicated? In all the examples I've

Re: Should System.exit be controlled by a Scope Local?

2022-02-28 Thread Kasper Nielsen
Is there really a need to make this so complicated? In all the examples I've seen so far it would be fine to set system-exit restrictions up from the program's main class. So why not just restrict it to the main class by default? I assume this class is under the control of the user or an

Re: Should System.exit be controlled by a Scope Local?

2022-02-28 Thread Andrew Haley
On 2/28/22 15:12, Sean Mullan wrote: > > On 2/27/22 1:47 PM, Andrew Haley wrote: > >> I'd like to explore the use of scope locals as a lightweight means to >> implement a system of permissions and capabilities for things such as >> this. > > Now you have piqued my curiosity, as I have explored a

Re: Should System.exit be controlled by a Scope Local?

2022-02-28 Thread Sean Mullan
On 2/27/22 1:47 PM, Andrew Haley wrote: I'd like to explore the use of scope locals as a lightweight means to implement a system of permissions and capabilities for things such as this. Now you have piqued my curiosity, as I have explored a capability based model for intercepting

Re: Should System.exit be controlled by a Scope Local?

2022-02-28 Thread Ethan McCue
Where would be a good place to do that sort of surveying? The mechanism does not seem to be that popular in open source software ( though that does make a degree of sense ), or at least the software grep.app scans https://grep.app/search?q=permission.getName%28%29.startsWith%28%22exitVM%22%29

Re: Should System.exit be controlled by a Scope Local?

2022-02-28 Thread Alan Bateman
On 26/02/2022 22:14, Ethan McCue wrote: I have a feeling this has been considered and I might just be articulating the obvious - but: As called out in JEP 411, one of the remaining legitimate uses of the Security Manager is to intercept calls to System.exit. This seems like a decent use case

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Ethan McCue
better to have a solution for these > > >> situations. > > >> (`Continuation` might help us?) > > >> > > >> > > >> > > >> On Sun, Feb 27, 2022 at 11:07 PM Ethan McCue > <mailto:et...@mccu

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread David Holmes
>>> On Sun, Feb 27, 2022 at 8:01 AM Remi Forax mailto:fo...@univ-mlv.fr>> wrote: >>> >>>> Hi Ethan, >>>> there is a far simpler solution, call org.apache.ivy.run(args, true) >>>> instead of org.apache.ivy.main(args) in yo

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Ethan McCue
11:07 PM Ethan McCue wrote: > >> > >>> That undermines my point some, but I think the overall shape of the use > >>> case still makes sense > >>> > >>> On Sun, Feb 27, 2022 at 8:01 AM Remi Forax wrote: > >>> > >>>> Hi

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread David Holmes
26, 2022 11:14:19 PM Subject: Should System.exit be controlled by a Scope Local? I have a feeling this has been considered and I might just be articulating the obvious - but: As called out in JEP 411, one of the remaining legitimate uses of the Security Manager is to intercept calls to System.

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Andrew Haley
On 2/26/22 22:14, Ethan McCue wrote: As called out in JEP 411, one of the remaining legitimate uses of the Security Manager is to intercept calls to System.exit. This seems like a decent use case for the Scope Local mechanism. It could well be. One problem, at least in the preview version of

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Ethan McCue
gt;> > regards, >> > Rémi >> > >> > - Original Message - >> > > From: "Ethan McCue" >> > > To: "core-libs-dev" >> > > Sent: Saturday, February 26, 2022 11:14:19 PM >> > > Subject: S

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Glavo
an McCue" > > > To: "core-libs-dev" > > > Sent: Saturday, February 26, 2022 11:14:19 PM > > > Subject: Should System.exit be controlled by a Scope Local? > > > > > I have a feeling this has been considered and I might just be > >

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Ethan McCue
provider. > > regards, > Rémi > > - Original Message - > > From: "Ethan McCue" > > To: "core-libs-dev" > > Sent: Saturday, February 26, 2022 11:14:19 PM > > Subject: Should System.exit be controlled by a Scope Local? > > >

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Remi Forax
11:14:19 PM > Subject: Should System.exit be controlled by a Scope Local? > I have a feeling this has been considered and I might just be articulating > the obvious - but: > > As called out in JEP 411, one of the remaining legitimate uses of the > Security Manager is to intercept c

Should System.exit be controlled by a Scope Local?

2022-02-26 Thread Ethan McCue
I have a feeling this has been considered and I might just be articulating the obvious - but: As called out in JEP 411, one of the remaining legitimate uses of the Security Manager is to intercept calls to System.exit. This seems like a decent use case for the Scope Local mechanism. public