[CRIU] [PATCH 5/6] dump: store signals in core->tc->signals, instead of writing them to signal_p/s*.img
Ruslan Kuprieiev
kupruser at gmail.com
Wed Aug 6 01:05:25 PDT 2014
06.08.2014 10:05, Pavel Emelyanov пишет:
>> -static int dump_task_signals(pid_t pid, struct pstree_item *item,
>> - struct cr_fdset *cr_fdset)
>> +static int dump_task_signals(pid_t pid, struct pstree_item *item, SignalsEntry *signals)
>> {
>> int i, ret;
>>
>> - ret = dump_signal_queue(pid, fdset_fd(cr_fdset, CR_FD_SIGNAL), true);
>> + ret = dump_signal_queue(pid, &signals->shared, true);
>> if (ret) {
>> pr_err("Can't dump pending signals (pid: %d)\n", pid);
>> return -1;
>> }
>>
>> + signals->n_private_ = item->nr_threads;
> n_private_ ? I mean -- with the _ at the end? Does it compile?
Yep =) Although in proto it is "private", protobuf-c compiles it as
"private_" =).
That is kinda odd, indeed, but "private" looks like a good name.
>> + signals->private_ = xmalloc(sizeof(*signals->private_) * signals->n_private_);
>> + if (!signals->private_)
>> + return -1;
>> +
>> for (i = 0; i < item->nr_threads; i++) {
>> - ret = dump_thread_signals(&item->threads[i]);
>> + ret = dump_signal_queue(item->threads[i].real, &signals->private_[i], false);
>> if (ret)
>> return -1;
>> }
More information about the CRIU
mailing list