George Hartzell writes:
> [...]
> ```
> i2c/i2c.go:15:9: cannot use [0] (type *byte) as type *_Ctype_uchar
> in assignment
> ```
>
> I can't come up with any cast that makes the compiler happy. I'm also
> unsure whether that line runs afoul of this commandment: *Go code may
> not store
On Fri, Aug 30, 2019 at 4:57 PM George Hartzell wrote:
>
> Ian Lance Taylor writes:
> > On Thu, Aug 29, 2019 at 6:26 PM George Hartzell
> wrote:
> > [...]
> > There is another approach, which is to use import "C", and then write code
> like
> >
> > const IoctlConstant = C.IoctlConstant
>
Ian Lance Taylor writes:
> On Thu, Aug 29, 2019 at 6:26 PM George Hartzell wrote:
> [...]
> There is another approach, which is to use import "C", and then write code
> like
>
> const IoctlConstant = C.IoctlConstant
> type GoIoctlType = C.CIoctlType
>
> and then use those types in
On Thu, Aug 29, 2019 at 6:26 PM George Hartzell wrote:
>
> I suppose I *could* write a cgo library that would wrap the C-based
> [i2c-tools] library, but I wanted to do it directly in Go, without
> adding the [i2c-tools] dependency.
>
> Or, are you saying that I should create a package that does
You changed the Read() method incorrectly - it should be using the Read lock, not the Write lock.Still, as I pointed out when I posted it, Play has a problem where it aborts if all routines are sleeping (not just blocked), so you need to run it locally.-Original Message-
From: T L
Sent:
On Friday, August 30, 2019 at 12:39:41 PM UTC-4, Robert Engels wrote:
>
>
> Makes no difference in the code I posted as long as they all use the
> same MultiWriterChannel. In fact, others can be late started, as they will
> fail fast if the channel is already closed.
>
Makes no difference in the code I posted as long as they all use the same MultiWriterChannel. In fact, others can be late started, as they will fail fast if the channel is already closed.-Original Message-
From: T L
Sent: Aug 30, 2019 11:13 AM
To: golang-nuts
Subject: Re: [go-nuts]
On Friday, August 30, 2019 at 10:35:29 AM UTC-4, Robert Engels wrote:
>
> I don't think so. Why do you think that is the case? The RWLock is "fair"
> in the sense that once the 'closer' attempts to get the lock, it is
> guaranteed to get it (as the code is structured) - the subsequent readers
I don't think so. Why do you think that is the case? The RWLock is "fair" in the sense that once the 'closer' attempts to get the lock, it is guaranteed to get it (as the code is structured) - the subsequent readers will queue behind the "writer = closer".-Original Message-
From: T L
@Robert
I think there is a difference between the code of @Leo and you.
In you code, the Wirte/Read/Close are all possible to block for ever.
On Thursday, August 29, 2019 at 8:59:10 PM UTC-4, Robert Engels wrote:
>
>
> Oops. You are right. The original used two different methods Closed() and
>
On 8/30/19 7:49 AM, Benjamin wrote:
> Do anyone have any suggestions on this? Thanks
Sudo is an option. I prefer to have a master root process that spawns workers
processes that drop privileges via setegid...seteuid... syscalls to dedicated
users for various tasks. Takes concurrency to the next
Hello.
I've originally asked this question on StackOverflow:
https://stackoverflow.com/questions/57714300/ho-to-properly-interpret-heapinuse-heapidle-heapreleased-memory-stats-in-gol
So here I will write just a quick summary:
I monitor memory usage of my program to determine memory pressure
Yes, it works. Thank you very much!
在 2019年8月30日星期五 UTC+8下午2:56:50,Jakob Borg写道:
>
> On 30 Aug 2019, at 08:49, Benjamin >
> wrote:
>
>
> Then I tried to use "sudo" to execute the command, but the environment
> variables can't be carried over into the command;
>
>
> This is a sudo configuration
On 30 Aug 2019, at 08:49, Benjamin
mailto:wangchao.nlp@gmail.com>> wrote:
Then I tried to use "sudo" to execute the command, but the environment
variables can't be carried over into the command;
This is a sudo configuration issue. See sudo --preserve-env etc.
Best regards,
Jakob
--
You
On Fri, Aug 30, 2019 at 8:53 AM Jan Mercl <0xj...@gmail.com> wrote:
> Moreover, it should not be possible.
But whitelisting certain users to run certain programs using sudo, but
no password, is possible.
--
You received this message because you are subscribed to the Google Groups
On Fri, Aug 30, 2019 at 8:49 AM Benjamin wrote:
>Do anyone have any suggestions on this? Thanks.
IINM, what you want is not possible. Moreover, it should not be possible.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from
Hi,
I need to execute a couple of commands in golang, the code is roughly
as below,
cmd := exec.Command(executable, newArgs...)
if env != nil && len(env) > 0 {
cmd.Env = env
}
outMsg, err := cmd.CombinedOutput()
if err != nil {
..
}
Executing the
17 matches
Mail list logo