http://codereview.appspot.com/4029053/diff/2001/src/pkg/exec/exec.go File src/pkg/exec/exec.go (right): http://codereview.appspot.com/4029053/diff/2001/src/pkg/exec/exec.go#newcode25 src/pkg/exec/exec.go:25: // Process is representing the running command. I thought ...
14 years, 1 month ago
(2011-02-02 05:28:23 UTC)
#3
how limited are handles as a resource in windows? if there are no strict limits, ...
14 years, 1 month ago
(2011-02-02 14:35:06 UTC)
#7
how limited are handles as a resource in windows?
if there are no strict limits, maybe just closing
the handle in the finalizer might be sufficient.
a quick google suggests that this might be plausible.
On 2 February 2011 13:10, <n13m3y3r@gmail.com> wrote:
>
> http://codereview.appspot.com/4029053/diff/10001/src/pkg/os/exec_windows.go
> File src/pkg/os/exec_windows.go (right):
>
>
http://codereview.appspot.com/4029053/diff/10001/src/pkg/os/exec_windows.go#n...
> src/pkg/os/exec_windows.go:26: func (p *Process) Close() Error {
> Can we call this Release rather than Close?
>
> Find + Close feels like doing an action on what was
> found, rather than simply giving back resources which
> were used during the procedure itself.
>
> Release will also reflect well the fact that
> StartProcess + Close doesn't really stop the process
> from running, which is a reasonable interpretation.
>
> http://codereview.appspot.com/4029053/
>
On 2011/02/02 14:35:06, rog wrote: > how limited are handles as a resource in windows? ...
14 years, 1 month ago
(2011-02-03 01:06:08 UTC)
#10
On 2011/02/02 14:35:06, rog wrote:
> how limited are handles as a resource in windows?
I don't know.
> if there are no strict limits, maybe just closing
> the handle in the finalizer might be sufficient.
I'm sure, it is possible, but why hide it, it is just one extra line of code.
Plus I like to have control over resources I hold. I see os.Process api to be
similar to os.File - you open it, you work with it, you tell os that you
finished with it.
> a quick google suggests that this might be plausible.
I'm not hell bent on it. If other reviewers agree with your suggestion, I will
change.
Alex
LGTM http://codereview.appspot.com/4029053/diff/16001/src/pkg/os/exec.go File src/pkg/os/exec.go (right): http://codereview.appspot.com/4029053/diff/16001/src/pkg/os/exec.go#newcode11 src/pkg/os/exec.go:11: // Process stores the information about a process ...
14 years, 1 month ago
(2011-02-03 03:31:15 UTC)
#11
On 3 February 2011 01:06, <alex.brainman@gmail.com> wrote: > On 2011/02/02 14:35:06, rog wrote: >> >> ...
14 years, 1 month ago
(2011-02-03 14:42:12 UTC)
#12
On 3 February 2011 01:06, <alex.brainman@gmail.com> wrote:
> On 2011/02/02 14:35:06, rog wrote:
>>
>> how limited are handles as a resource in windows?
>
> I don't know.
>
>> if there are no strict limits, maybe just closing
>> the handle in the finalizer might be sufficient.
>
> I'm sure, it is possible, but why hide it, it is just one extra line of
> code. Plus I like to have control over resources I hold. I see
> os.Process api to be similar to os.File - you open it, you work with it,
> you tell os that you finished with it.
at the least you should add a finalizer to call Release, as
File does.
Thank you for review. http://codereview.appspot.com/4029053/diff/16001/src/pkg/os/exec.go File src/pkg/os/exec.go (right): http://codereview.appspot.com/4029053/diff/16001/src/pkg/os/exec.go#newcode11 src/pkg/os/exec.go:11: // Process stores the information ...
14 years, 1 month ago
(2011-02-04 03:11:58 UTC)
#14
Issue 4029053: code review 4029053: os: implement new Process api
(Closed)
Created 14 years, 1 month ago by brainman
Modified 14 years, 1 month ago
Reviewers:
Base URL:
Comments: 51