Skip to content

Conversation

@larsewi
Copy link
Contributor

@larsewi larsewi commented Dec 18, 2024

When calling fdopen() in safe_fopen_create_perms() using the "wx"
mode we get...

warning: Invalid parameter passed to C runtime function.

...on Windows. Looking in both Linux man pages and Win32 API, I see that
the mode argument "x" is not specified as a valid argument in either
of them. Hence, it is probably not supported. Maybe Unix systems simply
ignore it, while Windows returns error? Either way, I believe it is safe
to omit it, given that we already called open() with the O_EXCL
flag, and that we are getting the file stream from that same file
descriptor.

Ticket: ENT-12511
Changelog: Title
Signed-off-by: Lars Erik Wik lars.erik.wik@northern.tech

Build Status

  • Manually tested on Windows Server 2019 & Ubuntu 24

@mender-test-bot
Copy link

There was an error running your pipeline, see logs for details.

@mender-test-bot
Copy link

There was an error running your pipeline, see logs for details.

@mender-test-bot
Copy link

There was an error running your pipeline, see logs for details.

@mender-test-bot
Copy link

There was an error running your pipeline, see logs for details.

Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for following up on this.

@mender-test-bot
Copy link

There was an error running your pipeline, see logs for details.

@larsewi
Copy link
Contributor Author

larsewi commented Dec 20, 2024

@cf-bottom jenkins please :)

@cf-bottom
Copy link

@larsewi
Copy link
Contributor Author

larsewi commented Dec 20, 2024

Here we go Build Status

@mender-test-bot
Copy link

There was an error running your pipeline, see logs for details.

@larsewi
Copy link
Contributor Author

larsewi commented Dec 20, 2024

@cf-bottom Jenkins please :)

@larsewi larsewi force-pushed the atomic branch 2 times, most recently from 142fbab to 0fc2ba7 Compare December 20, 2024 09:17
@mender-test-bot
Copy link

There was an error running your pipeline, see logs for details.

When calling `fdopen()` in `safe_fopen_create_perms()` using the `"wx"`
mode we get...

```
warning: Invalid parameter passed to C runtime function.
```

...on Windows. Looking in both Linux man pages and Win32 API, I see that
the mode argument `"x"` is not specified as a valid argument in either
of them. Hence, it is probably not supported. Maybe Unix systems simply
ignore it, while Windows returns error? Either way, I believe it is safe
to omit it, given that we already called `open()` with the `O_EXCL`
flag, and that we are getting the file stream from that same file
descriptor.

Ticket: ENT-12511
Changelog: Title
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@mender-test-bot
Copy link

There was an error running your pipeline, see logs for details.

Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now.

@NorthernTechHQ NorthernTechHQ deleted a comment from cf-bottom Dec 20, 2024
@cf-bottom
Copy link

@larsewi
Copy link
Contributor Author

larsewi commented Dec 20, 2024

Build Status

@larsewi larsewi merged commit 3b5afdb into NorthernTechHQ:master Dec 20, 2024
4 checks passed
@larsewi larsewi deleted the atomic branch January 13, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants