Skip to content

Fix rdb_child_exit_pipe incorrect close call#801

Merged
PingXie merged 1 commit intovalkey-io:unstablefrom
enjoy-binbin:fix_close_rdb_child_exit_pipe
Jul 18, 2024
Merged

Fix rdb_child_exit_pipe incorrect close call#801
PingXie merged 1 commit intovalkey-io:unstablefrom
enjoy-binbin:fix_close_rdb_child_exit_pipe

Conversation

@enjoy-binbin
Copy link
Copy Markdown
Member

server.rdb_child_exit_pipe is init in !dual_channel block,
so the call here would be close(-1) in !dual_channel way.

It will also generate a warning in valgrind:
Warning: invalid file descriptor -1 in syscall close()

Introduced in #60.

server.rdb_child_exit_pipe is init in !dual_channel block,
so the call here would be close(-1) in !dual_channel way.

It will also generate a warning in valgrind:
Warning: invalid file descriptor -1 in syscall close()

Introduced in valkey-io#60.

Signed-off-by: Binbin <binloveplay1314@qq.com>
@enjoy-binbin enjoy-binbin requested a review from PingXie July 18, 2024 04:52
@enjoy-binbin
Copy link
Copy Markdown
Member Author

@naglera please also take a look.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.43%. Comparing base (c584371) to head (20117e7).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #801      +/-   ##
============================================
- Coverage     70.44%   70.43%   -0.02%     
============================================
  Files           112      112              
  Lines         61135    61135              
============================================
- Hits          43066    43058       -8     
- Misses        18069    18077       +8     
Files Coverage Δ
src/rdb.c 76.13% <50.00%> (+0.14%) ⬆️

... and 13 files with indirect coverage changes

Copy link
Copy Markdown
Member

@PingXie PingXie left a comment

Choose a reason for hiding this comment

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

Thanks @enjoy-binbin!

@PingXie PingXie merged commit 36e81d9 into valkey-io:unstable Jul 18, 2024
@enjoy-binbin enjoy-binbin deleted the fix_close_rdb_child_exit_pipe branch July 18, 2024 06:18
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.

2 participants